Skip to content

Conversation

@Jancis
Copy link
Member

@Jancis Jancis commented Aug 6, 2025

This mirrors behavior of other cli tools where KUBECONFIG environment variable takes precedence for kubeconfig location.

This mirrors behavior of other cli tools
@Jancis Jancis requested a review from Rade333 August 6, 2025 07:07
@Rade333 Rade333 requested a review from Copilot September 1, 2025 10:59
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

Updates Kubernetes configuration handling to prioritize the KUBECONFIG environment variable over the default ~/.kube/config path, aligning with standard Kubernetes CLI tool behavior.

  • Adds KUBECONFIG environment variable support across all Kubernetes-related commands
  • Improves error messages to include the actual kubeconfig path being used
  • Enhances error handling with file existence checks and non-fatal deletion operations

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cmd/ciScriptsEsInitRemove.go Adds KUBECONFIG env var support and improves error message formatting
cmd/ciReleaseWakeup.go Adds KUBECONFIG env var support and fixes error message to include path
cmd/ciReleaseValidate.go Updates kubectl commands to use --no-headers flag and adds error tolerance
cmd/ciReleaseList.go Adds KUBECONFIG env var support with fallback to default path
cmd/ciReleaseDiff.go Adds KUBECONFIG env var support and file existence validation
cmd/ciReleaseDeploy.go Adds KUBECONFIG env var support and file existence validation
cmd/ciReleaseDelete.go Adds KUBECONFIG env var support, file validation, and improved error messages
cmd/ciReleaseCleanfailed.go Adds KUBECONFIG env var support, file validation, and changes fatal to non-fatal logging

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Rade333 Rade333 merged commit a472326 into master Sep 1, 2025
12 checks passed
@Rade333 Rade333 deleted the feature/kubeconfig-context-fix branch September 1, 2025 11:40
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.

3 participants