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

InCluster config is used even when KUBECONFIG env is specified #7795

Closed
skmatti opened this issue Jun 15, 2023 · 0 comments · Fixed by #7796
Closed

InCluster config is used even when KUBECONFIG env is specified #7795

skmatti opened this issue Jun 15, 2023 · 0 comments · Fixed by #7796

Comments

@skmatti
Copy link
Contributor

skmatti commented Jun 15, 2023

Expected Behavior

When KUBECONFIG env is specified in the calico-node config, the kubernetes client be created with the specified kubeconfig file.

Current Behavior

There are several places in the calico-node where InClusterConfig is used to create the kubernetes client.

  1. if config, err := rest.InClusterConfig(); err == nil {
  2. if config, err = rest.InClusterConfig(); err == nil {
  3. cfg, err := rest.InClusterConfig()
  4. if config, err := rest.InClusterConfig(); err == nil {

Possible Solution

Kubernetes client must be created only from KUBECONFIG env if it is specified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant