Skip to content

Chart/version label noise on each chart upgrade #392

Closed
@danopia

Description

@danopia

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:

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions