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

Helm chart: change kubectl config mount path #1435

Merged
merged 1 commit into from Oct 8, 2018

Conversation

@stefanprodan
Copy link
Member

stefanprodan commented Oct 8, 2018

  • mount kubectl config to /root/.kubectl
  • set config path using KUBECONFIG env var
  • enable kubectl caching by mounting the config to a different dir than $HOME/.kube/

Fix: #1422

- set config path using KUBECONFIG env var
- enable kubectl caching by mounting the config to a different dir than $HOME/.kube/
@stefanprodan stefanprodan requested a review from squaremo Oct 8, 2018
@squaremo

This comment has been minimized.

Copy link
Member

squaremo commented Oct 8, 2018

  • mount kubectl config to /root/.kubectl

There's a .kubectl?? You wouldn't know from the documentation.

@squaremo

This comment has been minimized.

Copy link
Member

squaremo commented Oct 8, 2018

  • mount kubectl config to /root/.kubectl

There's a .kubectl?? You wouldn't know from the documentation.

Oh I see, it's an invention for the purpose of moving the config out of the way. As you were.

@hiddeco

This comment has been minimized.

Copy link
Member

hiddeco commented Oct 8, 2018

Should we also mention this somewhere in the docs(?) (if validated as a fix) for people not using the Helm chart?

@stefanprodan

This comment has been minimized.

Copy link
Member Author

stefanprodan commented Oct 8, 2018

@squaremo that path is a non-standard one.

I've tested the change by setting the default namespace to demo in the values.yaml kube config and I've created a deployment file with no namespace specified. Flux deployed that in the demo namespaces instead of default, this proves that kubectl uses the KUBECONFIG instead of the ~/.kube/config

@stefanprodan

This comment has been minimized.

Copy link
Member Author

stefanprodan commented Oct 8, 2018

@hiddeco if you install Flux without Helm there is no issue with kubectl caching since there is no read only volume mounted at /root/.kube in here

@squaremo

This comment has been minimized.

Copy link
Member

squaremo commented Oct 8, 2018

Should we also mention this somewhere in the docs(?) (if validated as a fix) for people not using the Helm chart?

Yes; I can't remember if there's an FAQ or troubleshooting entry regarding kubeconfig, but if not we can make one.

Copy link
Member

squaremo left a comment

Looks good, thanks Stefan.

(NB we should not release this until there's a flux release that has the new --git-timeout flag (or, the chart should not supply it if it doesn't have a value))

@stefanprodan

This comment has been minimized.

Copy link
Member Author

stefanprodan commented Oct 8, 2018

Yes I'm aware of the --git-timeout change, both Flux and helm-op will need a release before publishing the Helm chart.

@stefanprodan stefanprodan merged commit 2980164 into master Oct 8, 2018
1 check passed
1 check passed
ci/circleci: build Your tests passed on CircleCI!
Details
@stefanprodan stefanprodan deleted the kubecfg branch Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.