Skip to content

helm diff --three-way-merge does not detect manual changes on Custom Resources (CRDs) #917

Closed

Description

@orco49

We are seeing inconsistent behavior with helm diff upgrade --three-way-merge when detecting manual changes made directly in the Kubernetes cluster, specifically for Custom Resources (CRDs).

For built-in Kubernetes resources (e.g. Deployment), helm diff --three-way-merge correctly detects live changes made via kubectl edit/patch.
However, for CRDs (example below uses KEDA ScaledObject), manual changes in the cluster are not detected, even when the field is explicitly defined in the Helm chart.

What works ✅
For built-in resources (e.g. Deployment):

1.Deploy via Helm
2.Manually edit:
kubectl edit deployment my-app
change resources.limits.memory value

Run:
helm diff upgrade <release> <chart> --three-way-merge --dry-run

➡️ The manual change is detected and shown in the diff.

What does NOT work ❌
For CRDs (example: KEDA ScaledObject):

  1. Deploy via Helm with spec.maxReplicaCount defined in the chart
  2. Manually edit the ScaledObject:
kubectl patch scaledobject my-so \
  -n <ns> \
  --type=merge \
  -p '{"spec":{"maxReplicaCount":30}}'

Run:
helm diff upgrade <release> <chart> --three-way-merge --dry-run

➡️ No diff is shown, even though the live value differs from the chart.

Questions:

  1. Is this a known limitation of helm-diff with CRDs?
  2. Is --three-way-merge expected not to detect live drift for CRDs?
  3. Are there plans or recommendations for supporting live drift detection on CRDs?

Activity

  1. closedEyesSearch commented on Jan 23, 2026

    @closedEyesSearch

    Also experiencing this with crossplane CRDs. Diffs don't catch drifts, kubectl does though.

    helm template  ... > outofspec.yaml
    kubectl diff -f outofspec.yaml
    ...
       identity:
         secretRef:
           key: creds
    -      name: azure-provider-creds-badedit
    +      name: azure-provider-creds
    ...
    
    # VS
    
    helm diff upgrade ... --three-way-merge ...
    # no changes
    
  2. added 2 commits that reference this issue on Feb 1, 2026
    115630c
    6610be9
  3. yxxhero commented on Feb 1, 2026

    @yxxhero
    Collaborator

    @orco49 could you try to use this fix/cr-three-way-merge?

  4. terabyte128 commented on Feb 10, 2026

    @terabyte128

    I'm experiencing the same issue with Istio's CRDs (specifically, AuthorizationPolicy). Steps to reproduce:

    • Deploy a chart with Helm (in our case, Helmfile)
    • Make a manual change using kubectl edit to an AuthorizationPolicy resource
    • helmfile apply --interactive does not show a diff
    • helmfile template | kubectl diff -f - does

    I tried the branch you posted and got an error that I'll post over in that PR.

  5. frittentheke commented on Aug 3, 2026

    @frittentheke

    @orco49 did you test the proposed fix in #923?

  6. added a commit that references this issue on Sep 25, 2026
    192fc40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions