Skip to content

fix(kube): correctly resolve client config per context#388

Merged
Fral738 merged 2 commits intomainfrom
fix/kube/fix-all-contexts
Feb 12, 2026
Merged

fix(kube): correctly resolve client config per context#388
Fral738 merged 2 commits intomainfrom
fix/kube/fix-all-contexts

Conversation

@Fral738
Copy link
Contributor

@Fral738 Fral738 commented Feb 12, 2026

No description provided.

Signed-off-by: Evgeniy Frolov <evgeniy.frolov@flant.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes kubeconfig context resolution when building Kubernetes clients for all contexts, ensuring each client is created using its own context rather than reusing a single (possibly user-specified) context.

Changes:

  • Load the raw kubeconfig without forcing a specific context to enable enumerating all contexts correctly.
  • Resolve per-context clientcmd.ClientConfig using the iterated contextName when constructing each client.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Evgeniy Frolov <evgeniy.frolov@flant.com>
@Fral738 Fral738 requested a review from ilya-lesikov February 12, 2026 12:15
@Fral738 Fral738 merged commit 5d3f8c0 into main Feb 12, 2026
1 of 2 checks passed
@Fral738 Fral738 deleted the fix/kube/fix-all-contexts branch February 12, 2026 12:27
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.

2 participants