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

cli: add option to automatically merge kubeconfig file on init #1136

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

daniel-weisse
Copy link
Member

@daniel-weisse daniel-weisse commented Feb 3, 2023

Proposed change(s)

Add --merge-kubeconfig flag to constellation init.
If set, automatically merges the config generated by init into the default configuration in $HOME/.kube/config and sets it as the current context.
Users are then able to connect to the cluster without having to do any extra setup.

If the KUBECONFIG env variable is set, the new config is still merged into the default config, but we cant reliably tell if kubectl will load this config, so a warning is printed in this case telling the user they might need to unset the KUBECONFIG env var

Checklist

  • Update docs
  • Add labels (e.g., for changelog category)
  • Link to Milestone

@daniel-weisse daniel-weisse added the feature This introduces new functionality label Feb 3, 2023
@daniel-weisse daniel-weisse added this to the v2.6.0 milestone Feb 3, 2023
cli/internal/cmd/init.go Outdated Show resolved Hide resolved
cli/internal/cmd/init.go Outdated Show resolved Hide resolved
cli/internal/cmd/init.go Outdated Show resolved Hide resolved
Base automatically changed from feat/cli/kubeconfig-naming to main February 10, 2023 12:27
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
@netlify
Copy link

netlify bot commented Feb 10, 2023

Deploy Preview for constellation-docs failed.

Name Link
🔨 Latest commit 627b053
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/63e6391416afe20008b54be2

@3u13r 3u13r removed their request for review February 10, 2023 12:41
@daniel-weisse daniel-weisse merged commit 90ce320 into main Feb 10, 2023
@daniel-weisse daniel-weisse deleted the feat/cli/config-merging branch February 10, 2023 13:59
msanft pushed a commit that referenced this pull request Feb 13, 2023
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
msanft pushed a commit that referenced this pull request Feb 13, 2023
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This introduces new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants