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

Chart/version label noise on each chart upgrade

Open danopia opened this issue 3 years ago • 2 comments

I've been using helm-diff via helmfile for some time now to post a diff into a Github PR comment. I'd like to do something about the nuisance label change that shows up for every single resource when a chart version changes. I don't mind these labels changing on upgrade, and I feel other helm users view these same labels as noise too.

I didn't see any open discussions around reducing diff noise. I hope opening a new issue is acceptable. This is a pretty straightforward usecase at least.

For example, updating jetstack/cert-manager from 1.8.0 to 1.8.1. The only actual change is the image tag in the deployments. But the printed diff is huge and quickly exceeds Github's max comment size, basically repeating this section for all 48 resources:

$ helmfile [...] diff --context 5

[...]
cert-manager, cert-manager-cainjector, ClusterRole (rbac.authorization.k8s.io) has changed:
...
    labels:
      app: cainjector
      app.kubernetes.io/name: cainjector
      app.kubernetes.io/instance: cert-manager
      app.kubernetes.io/component: "cainjector"
-     app.kubernetes.io/version: "v1.8.0"
+     app.kubernetes.io/version: "v1.8.1"
      app.kubernetes.io/managed-by: Helm
-     helm.sh/chart: cert-manager-v1.8.0
+     helm.sh/chart: cert-manager-v1.8.1
  rules:
    - apiGroups: ["cert-manager.io"]
      resources: ["certificates"]
      verbs: ["get", "list", "watch"]
    - apiGroups: [""]
...
cert-manager, cert-manager-cainjector, ClusterRoleBinding (rbac.authorization.k8s.io) has changed:
...
    labels:
      app: cainjector
      app.kubernetes.io/name: cainjector
      app.kubernetes.io/instance: cert-manager
      app.kubernetes.io/component: "cainjector"
-     app.kubernetes.io/version: "v1.8.0"
+     app.kubernetes.io/version: "v1.8.1"
      app.kubernetes.io/managed-by: Helm
-     helm.sh/chart: cert-manager-v1.8.0
+     helm.sh/chart: cert-manager-v1.8.1
  roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: ClusterRole
    name: cert-manager-cainjector
  subjects:
[...]

Potentially related:

  • #371
  • #365

danopia avatar Jun 15 '22 12:06 danopia

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 06:09 stale[bot]

There is still interest in this.

z0rc avatar Oct 04 '22 19:10 z0rc