Skip to content

Application explorer is broken if KUBECONFIG env var is set #3382

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

Closed
datho7561 opened this issue Sep 29, 2023 · 2 comments · Fixed by #3383
Closed

Application explorer is broken if KUBECONFIG env var is set #3382

datho7561 opened this issue Sep 29, 2023 · 2 comments · Fixed by #3383
Assignees
Milestone

Comments

@datho7561
Copy link
Contributor

To reproduce:

  1. set export KUBECONFIG='~/folder/config.yaml' in ~/.bashrc or similar
  2. create the file referenced in the previous step, and add some sample data in it (eg. one of the kubeconfigs from https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters)
  3. log in to a cluster, such as crc or Sandbox (this will create new entries in your new ~/folder/config.yaml for crc or sandbox)
  4. start the extension
  5. navigate to the openshift sidebar

expected: crc/sandbox is shown in the application explorer (the top item in the sidebar)

actual: there are three buttons: "Login", "Select Kubernetes Context", "Add OpenShift Cluster", and they are disabled

@datho7561 datho7561 changed the title Application explorer is broken if Application explorer is broken if KUBECONFIG env var is set Sep 29, 2023
@datho7561 datho7561 self-assigned this Sep 29, 2023
@datho7561 datho7561 moved this to 📋 Backlog in IDE Cloudaptors Sep 29, 2023
@datho7561
Copy link
Contributor Author

I have a PR started for this. The main blocker I ran into is that you can configure multiple KUBECONFIG files: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#linux-1

@datho7561 datho7561 moved this from 📋 Backlog to 🏗 In progress in IDE Cloudaptors Sep 29, 2023
@datho7561
Copy link
Contributor Author

the library we are using to load the kube config doesn't handle multiple kube config well

datho7561 added a commit to datho7561/vscode-openshift-tools that referenced this issue Oct 2, 2023
- Watch for changes in file(s) indicated by `KUBECONFIG` when it's set
- Warn when multiple config files are specified in `KUBECONFIG`,
  since the Kubernetes client library we are using doesn't support this use case

Closes redhat-developer#3382

Signed-off-by: David Thompson <[email protected]>
@datho7561 datho7561 moved this from 🏗 In progress to 👀 In review in IDE Cloudaptors Oct 2, 2023
datho7561 added a commit to datho7561/vscode-openshift-tools that referenced this issue Oct 6, 2023
- Watch for changes in file(s) indicated by `KUBECONFIG` when it's set
- Warn when multiple config files are specified in `KUBECONFIG`,
  since the Kubernetes client library we are using doesn't support this use case

Closes redhat-developer#3382

Signed-off-by: David Thompson <[email protected]>
datho7561 added a commit to datho7561/vscode-openshift-tools that referenced this issue Oct 19, 2023
- Watch for changes in file(s) indicated by `KUBECONFIG` when it's set
- Warn when multiple config files are specified in `KUBECONFIG`,
  since the Kubernetes client library we are using doesn't support this use case

Closes redhat-developer#3382

Signed-off-by: David Thompson <[email protected]>
datho7561 added a commit to datho7561/vscode-openshift-tools that referenced this issue Oct 20, 2023
- Watch for changes in file(s) indicated by `KUBECONFIG` when it's set
- Force users to pick one file when multiple config files are specified in `KUBECONFIG`,
  since the Kubernetes client library we are using doesn't support using multiple files

Closes redhat-developer#3382

Signed-off-by: David Thompson <[email protected]>
datho7561 added a commit that referenced this issue Oct 20, 2023
- Watch for changes in file(s) indicated by `KUBECONFIG` when it's set
- Force users to pick one file when multiple config files are specified in `KUBECONFIG`,
  since the Kubernetes client library we are using doesn't support using multiple files

Closes #3382

Signed-off-by: David Thompson <[email protected]>
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDE Cloudaptors Oct 20, 2023
@datho7561 datho7561 added this to the 1.10.0 milestone Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant