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
Merge kubeconfig files for config #1883
Merge kubeconfig files for config #1883
Conversation
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Codecov Report
@@ Coverage Diff @@
## master #1883 +/- ##
==========================================
+ Coverage 33.42% 33.46% +0.04%
==========================================
Files 122 123 +1
Lines 13847 13873 +26
==========================================
+ Hits 4628 4643 +15
- Misses 8719 8728 +9
- Partials 500 502 +2
Continue to review full report at Codecov.
|
cmd/context/context.go
Outdated
@@ -147,14 +147,14 @@ func Run(ctx context.Context, ctxOptions *ContextOptions) error { | |||
if err := okteto.WriteOktetoContextConfig(); err != nil { | |||
return err | |||
} | |||
if err := kubeconfig.Write(okteto.Context().Cfg, config.GetKubeconfigPath()); err != nil { | |||
if err := kubeconfig.Write(okteto.Context().Cfg, config.GetKubeconfigPath()[0]); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we always get config.GetKubeconfigPath()[0]
, should the function return just the first element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is just to copy the current config into one of the files KUBECONFIG
env var has. We are returning a list with all the Kubernetes config paths most of the time
Could we add a test for this scenario? |
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Signed-off-by: Javier López Barba <javier@okteto.com>
Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project. Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken. 💡 Shall we fix this?This will only take a few moments. First, clone your fork and checkout this branch using the git CLI. Next, set up your real name and email address:
Finally, run one of these commands to add the "Signed-off-by" line to your commits. If you only have one commit so far then run: Check that the message has been added properly by running "git log". |
Signed-off-by: Javier López Barba javier@okteto.com
Fixes #1433
Proposed changes
KUBECONFIG
env into a single config