Skip to content

Allow people to use KUBECONFIG env var and multiple config files #4816#5005

Merged
vrubezhny merged 1 commit intoredhat-developer:mainfrom
vrubezhny:fix-support-for-multiple-kube-configs
Apr 28, 2025
Merged

Allow people to use KUBECONFIG env var and multiple config files #4816#5005
vrubezhny merged 1 commit intoredhat-developer:mainfrom
vrubezhny:fix-support-for-multiple-kube-configs

Conversation

@vrubezhny
Copy link
Copy Markdown
Contributor

Fixes #4816

@vrubezhny vrubezhny force-pushed the fix-support-for-multiple-kube-configs branch 5 times, most recently from 1044859 to 7cd4d60 Compare April 23, 2025 16:54
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 45.45455% with 240 lines in your changes missing coverage. Please review.

Project coverage is 44.79%. Comparing base (da60441) to head (cad5d26).
Report is 1010 commits behind head on main.

Files with missing lines Patch % Lines
src/util/kubeUtils.ts 57.33% 93 Missing ⚠️
src/openshift/cluster.ts 23.25% 66 Missing ⚠️
src/oc/ocWrapper.ts 36.66% 57 Missing ⚠️
src/explorer.ts 31.25% 22 Missing ⚠️
src/openshift/project.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5005       +/-   ##
===========================================
+ Coverage   32.37%   44.79%   +12.41%     
===========================================
  Files          85       99       +14     
  Lines        6505     8399     +1894     
  Branches     1349     1786      +437     
===========================================
+ Hits         2106     3762     +1656     
- Misses       4399     4637      +238     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vrubezhny vrubezhny force-pushed the fix-support-for-multiple-kube-configs branch 14 times, most recently from b86503c to 0e20f3f Compare April 24, 2025 17:59
@vrubezhny vrubezhny requested a review from datho7561 April 24, 2025 23:49
Copy link
Copy Markdown
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well for me when I have kind and minikube set up in different config files. Not sure when the greyed out icon is used, but other than that the code looks reasonable. Thanks, Victor!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is this used?

Copy link
Copy Markdown
Contributor Author

@vrubezhny vrubezhny Apr 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When displaying a list of available clusters in Login QuickPick the current active cluster we're logged in is shown with a "red" colored icon, while the others are ahown with a "grey" icon:

image

Note: we actually might be logged in to more than one cluster at the same time, the "red"-icon will be used only for the cluster, that is referenced in the "current-context", so other clusters we might be logged in too will still be shown with a "grey" icon.
The "current" cluster is always displayed at the top of the list.

@vrubezhny vrubezhny force-pushed the fix-support-for-multiple-kube-configs branch from 0e20f3f to 200d303 Compare April 25, 2025 22:11
@vrubezhny vrubezhny force-pushed the fix-support-for-multiple-kube-configs branch from 200d303 to cad5d26 Compare April 28, 2025 20:04
@vrubezhny vrubezhny merged commit 53f37af into redhat-developer:main Apr 28, 2025
10 of 12 checks passed
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 this pull request may close these issues.

Allow people to use KUBECONFIG env var and multiple config files

2 participants