Skip to content

Bug: Multi-file KUBECONFIG fails with HELM_DIFF_THREE_WAY_MERGE=true - regression in v3.14.0 #969

@R-omk

Description

@R-omk

Problem:
Multi-file KUBECONFIG fails with HELM_DIFF_THREE_WAY_MERGE=true (regression in v3.14.0)

Error:

Error: kubernetes cluster unreachable: stat /path/to/file1:/path/to/file2:/path/to/file3: no such file or directory

Affected: v3.14.0, v3.15.0+
Working: v3.13.2 and earlier

Reproduce:

export KUBECONFIG=/path/file1:/path/file2:/path/file3

HELM_DIFF_THREE_WAY_MERGE=true \
HELM_DIFF_NORMALIZE_MANIFESTS=true \
HELM_DIFF_USE_UPGRADE_DRY_RUN=true \
helm diff upgrade my-release my-chart --kube-context=ctx --values values.yaml

Root Cause:

In k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go:166-167:

if f.KubeConfig != nil {
    loadingRules.ExplicitPath = *f.KubeConfig  // ❌ No filepath.SplitList()
}

Then in k8s.io/client-go/tools/clientcmd/loader.go:208:

if _, err := os.Stat(rules.ExplicitPath); os.IsNotExist(err) {
    return nil, err  // ❌ os.Stat() on "file1:file2:file3" string
}

When ExplicitPath is set, the path isn't split. os.Stat() is called on the entire colon-separated string instead of individual files.

Timeline:

  • v3.13.2 (Nov 2025): Working with k8s.io/cli-runtime 0.34.1
  • v3.14.0 (Nov 17, 2025): Helm v4 support added - BROKEN
  • v3.15.0+ (Feb 2026): k8s.io/client-go 0.35.x + k8s.io/cli-runtime 0.35.x - STILL BROKEN

Workaround:

KUBECONFIG=/path/to/single-config-file  # Use single file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions