Skip to content

Init environment - support oc kubeconf file #19

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

Closed
teyckmans opened this issue Jan 29, 2020 · 1 comment
Closed

Init environment - support oc kubeconf file #19

teyckmans opened this issue Jan 29, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request implemented
Milestone

Comments

@teyckmans
Copy link
Collaborator

initEnvironment should support the kubeconf file generated by the oc command line.

  • does not contain the CA
  • is placed inside the $HOME directory
  • not sure we pickup the token correctly.
@teyckmans teyckmans added this to the 0.1.0 milestone Jan 29, 2020
@teyckmans teyckmans self-assigned this Jan 30, 2020
teyckmans added a commit that referenced this issue Jan 30, 2020
- check if there is certificate-authority-data before reading it, default to empty string in case not available. Only write out not empty certificate data to the CA trust file.
- use $HOME environment variable instead of user.home system property to get the default .kube/config file location.
- add a branch to use the user/token as AccessTokenUserDetail info.
@teyckmans teyckmans added the enhancement New feature or request label Jan 30, 2020
@teyckmans
Copy link
Collaborator Author

really annoying that the certificate data is not available, trying to fall back to fetching the CA from the server URL.
Currently only getting the server certificate, but I would like to save the root CA instead.
After some searching did not really get any closer. Tried using the chain that is passed into the trust manager but that also only contained the server cert.

teyckmans added a commit that referenced this issue Jan 30, 2020
- added fallback to retrieve certificate from api server url in KubectlConfigReader.kt
- added additional check on empty cert data in ClusterClientBuilder.kt
teyckmans pushed a commit that referenced this issue Feb 17, 2020
- improvements to init environment for oc command line
- use namespace of kubectl config as default namespace for the initialized environment.
- in case the kubectl config does not contain a CA to trust, try to retrieve it with an SSL handshake.
- limit TLS to v1.2 - see golang/go#35722 for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implemented
Projects
None yet
Development

No branches or pull requests

1 participant