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

feat: Implement kube config injection on openshift cluster #517

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

mmorhun
Copy link
Contributor

@mmorhun mmorhun commented Feb 17, 2020

Signed-off-by: Mykola Morhun mmorhun@redhat.com

What does this PR do?

Implements injection of Kubernetes config from host into Che workspace for Openshift infrastructure.
Also implements config injection for Openshift cluster with kubectl (yes, kubectl and oc is not interchangeable in all cases).

How to test

Start your cluster, deploy Che on it. When ready run the following command:

chectl workspace:inject -k -c <container-name>

If one wants to test specific CLI tool (oc or kubectl) with the cluster, then one need to remove other options from CLI list in getClusterClientCommand function in src/util.ts file.

To be able to test in some local clusters which has 'bad' TLS certificate, one need to relogin with --insecure-skip-tls-verify option and run chectl (as described above) before autologout. For example, for CRC, the command might look like:

oc logout --insecure-skip-tls-verify && oc login -u kubeadmin -p BdTY8-Vra64-gD3cI-dAPS6 https://api.crc.testing:6443 --insecure-skip-tls-verify && ./run workspace:inject -k -c nodejs

What issues does this PR fix or reference?

eclipse-che/che#15987

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked it with Che running on minishift disabling kubectl in getClusterClientCommand.
So, workspace:inject -k successfully copied my kubeconfig into a sidecar with oc. 👍

@tolusha tolusha merged commit 3cc1458 into master Feb 18, 2020
@mmorhun mmorhun deleted the che-15987 branch February 18, 2020 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants