chectl inject should support oc CLI
See original GitHub issueIs 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 https://github.com/che-incubator/chectl/pull/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
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
An alternative is to check if
kubectl
is installed locally and if it’s not check foroc
.kubectl
andoc
are interchangeable so it doesn’t matter if the platform is openshift or kubernetes:kubectl
works on an openshift cluster andoc
works on a kubernetes cluster.Also need to implement the command for Openshift case.