-
Notifications
You must be signed in to change notification settings - Fork 352
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
Add support for KUBECONFIG with multiple files #5105
Conversation
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.
I haven't looked deeply at this, but it seems to me that we're completely ignoring the kubeconfig
parameter. And it's used in the CLI for the
--kube-config string Path to the kube config file to use for CLI requests
feature.
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.
With this, we'd move from a file based approach to the env var based approach expected by Kubernetes. I don't have any objection, however, if we want to do this we cannot remove the file based approach directly. We need to keep supporting it, adding this new approach beside the old one and also adding some documentation to [1].
Mind that we're planning to move the entire CLI to Camel Jbang [2], so, any work done in the CLI, may be disappearing during 2024.
[1] https://camel.apache.org/camel-k/2.2.x/cli/cli.html#_global_flags
[2] apache/camel#12474
d93fa7a
to
78d442c
Compare
You are right. I forgot to keep the current functionality. I have updated the commit to add support for the argument as well and keep the current functionality. |
The plan is to move the CLI portion but not the operator if I understand correctly? |
I went a little deeper in the whole usage of the kubeconfig file and we would need to revise the way it is handled. Some shortcuts were taken and do not exactly follow the kubernetes way to implement a client. Given that there is a migration planned, we can drop this PR as the workaround is not that difficult (was more a quality of life issue). |
No problem. Thanks for taking the time to make the development though. |
Yes, just the CLI. |
This PR intends to solve the issue where a kubeconfig containing multiple files could not be used with Kamel.
As defined in https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#linux-1
Release Note
Fixes #5107