helm-diff icon indicating copy to clipboard operation
helm-diff copied to clipboard

Diff is incorrect when values in values.yaml change and using local Chart

Open cbugneac-nex opened this issue 1 year ago • 0 comments

I have a local Chart in the ingress-class directory which is deployed to K8s cluster:

.
├── ingress-class
│   ├── Chart.yaml
│   ├── templates
│   │   ├── ingress-class-params.yaml
│   │   └── ingress-class.yaml
│   └── values.yaml

values.yaml

inboundCIDRs:
  - "1.1.1.1/32"     # Test VPN1
  - "2.2.2.2/32"     # Test VPN2

If I make a change to the values.yaml file by adding new IPs, the diff doesn't show any updates:

helm diff upgrade ingress-class ingress-class/ --allow-unreleased

My expectation is that helm diff should look for updated values file in Helm chart directory but it doesn't.

But if I include the path to values file explicitly, it works:

helm diff upgrade --allow-unreleased -f ingress-class/values.yaml ingress-class ingress-class/
default, external, IngressClassParams (elbv2.k8s.aws) has changed:
  # Source: ingress-class/templates/ingress-class-params.yaml
  apiVersion: elbv2.k8s.aws/v1beta1
  kind: IngressClassParams
  metadata:
    name: external
  spec:
    scheme: internet-facing
    group:
      name: external
    inboundCIDRs:
      - 1.1.1.1/32
      - 2.2.2.2/32
+     - 3.3.3.3/32
+     - 4.4.4.4/32
$ helm plugin list
NAME	VERSION	DESCRIPTION
diff	3.8.1  	Preview helm upgrade changes as a diff

$ helm version
version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.4"}

$ sw_vers
ProductName:		macOS
ProductVersion:		13.4
BuildVersion:		22F66

cbugneac-nex avatar Jun 05 '23 10:06 cbugneac-nex