Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chectl inject should support oc CLI #15987

Closed
azatsarynnyy opened this issue Feb 11, 2020 · 10 comments
Closed

chectl inject should support oc CLI #15987

azatsarynnyy opened this issue Feb 11, 2020 · 10 comments
Assignees
Labels
area/chectl Issues related to chectl, the CLI of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@azatsarynnyy
Copy link
Member

azatsarynnyy commented Feb 11, 2020

Is your enhancement related to a problem? Please describe.

Currently, chectl workspace inject -k command uses kubectl to copy a kubeconfig file from local machine to the plugin sidecar. It was introduced in the PR che-incubator/chectl#33 and supposed to be used with Che deployed on minikube, with Che Kubernetes Plugin.

chectl workspace inject -k command may be also helpful with Che deployed on minishift. For that, it has be improved to use oc CLI as well.

Describe the solution you'd like

chectl may detect which platform is currently used (minikube/minishift) and use kubectl or oc CLI.

Describe alternatives you've considered

From Mario's comment:

An alternative is to check if kubectl is installed locally and if it's not check for oc. kubectl and oc are interchangeable so it doesn't matter if the platform is openshift or kubernetes: kubectl works on an openshift cluster and oc works on a kubernetes cluster.

Additional context

kubectl cp command usage in chectl sources https://github.com/che-incubator/chectl/blob/1744186acbf0b78404cb1fd267e8ce1a9985144e/src/commands/workspace/inject.ts#L173

@azatsarynnyy azatsarynnyy added kind/enhancement A feature request - must adhere to the feature request template. area/chectl Issues related to chectl, the CLI of Che labels Feb 11, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 11, 2020
@azatsarynnyy
Copy link
Member Author

cc/ @nickboldt

@nickboldt
Copy link
Contributor

Will this be done in time for Che 7.9? I'm hoping so since we need this functionality for the camel-k devfile.

@nickboldt nickboldt added this to the 7.9.0 milestone Feb 11, 2020
@azatsarynnyy
Copy link
Member Author

Will this be done in time for Che 7.9? I'm hoping so since we need this functionality for the camel-k devfile.

@tolusha FYI

@l0rd
Copy link
Contributor

l0rd commented Feb 11, 2020

chectl may detect which platform is currently used (minikube/minishift) and use kubectl or oc CLI.

An alternative is to check if kubectl is installed locally and if it's not check for oc. kubectl and oc are interchangeable so it doesn't matter if the platform is openshift or kubernetes: kubectl works on an openshift cluster and oc works on a kubernetes cluster.

@l0rd l0rd added severity/P1 Has a major impact to usage or development of the system. team/deploy and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 11, 2020
@tolusha
Copy link
Contributor

tolusha commented Feb 12, 2020

@azatsarynnyy
So, the purpose of this issue is to detect oc/kubectl for inject command? right?

@azatsarynnyy
Copy link
Member Author

@azatsarynnyy
So, the purpose of this issue is to detect oc/kubectl for inject command? right?

correct

@tsmaeder
Copy link
Contributor

Will this be done in time for Che 7.9? I'm hoping so since we need this functionality for the camel-k devfile.

How can we need this for a devfile? Che/CRW-ctl might not even be present if Che is installed via operator, no?

@nickboldt
Copy link
Contributor

may be also helpful with Che deployed on minishift. For that, it has be improved to use oc CLI as well.

I don't think we support minishift anymore -- especially not for use with crwctl, which is officially supported ONLY for deploying to OCP 3.1 and airgapped/offline 4.x.

How can we need this for a devfile?

The camelk devfile's sidecar contains helm, kubectl and kamel. Can a user just run kubectl directly from within the workspace's sidecar's terminal?

@azatsarynnyy
Copy link
Member Author

Can a user just run kubectl directly from within the workspace's sidecar's terminal?

Sure, just open a Theia terminal into the sidecar and use CLI

@mmorhun mmorhun self-assigned this Feb 13, 2020
@mmorhun
Copy link
Contributor

mmorhun commented Feb 14, 2020

Also need to implement the command for Openshift case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chectl Issues related to chectl, the CLI of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

7 participants