Commit Graph

1 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 3ef595ba19 Add --kube-context flag to chartify TemplateArgs for cluster operations
When using jsonPatches (kustomize), the helm template command now receives
the --kube-context flag when running cluster-requiring commands (diff, apply,
sync, etc.). This ensures that helm uses the correct cluster context defined
in helmDefaults.kubeContext, release.kubeContext, or environment.kubeContext.

The fix follows the same priority order as the existing kubeConnectionFlags method:
1. release.KubeContext
2. environment.KubeContext
3. helmDefaults.KubeContext

Tests added to verify the fix works correctly for different commands and
context configurations.

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
2025-12-08 07:41:26 +00:00