charts icon indicating copy to clipboard operation
charts copied to clipboard

[chart/redis-ha][BUG] Chart triggeres new helm release even without changes

Open stefanandres opened this issue 3 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce

  1. helm install chart
  2. Run helm diff upgrade ...
      metadata:
        name: redis-ha-haproxy
        labels:
          app: redis-ha-haproxy
          release: redis-ha
-         revision: "94"
+         revision: "1"
        annotations:
          checksum/config: 0466b4b72b9c44d6b5f4ba7db9cf6f30a52ba20d6c3e298f8473cdeb83844ce1
      spec:
        # Needed when using unmodified rbac-setup.yml
        
...
            requiredDuringSchedulingIgnoredDuringExecution:
              - labelSelector:
                  matchLabels:
                    app: redis-ha-haproxy
                    release: redis-ha
-                   revision: "94"
+                   revision: "1"
  1. Run helm upgrade

helm upgrade will create a new helm release and it will rotate all pods because the the revision in the requiredDuringSchedulingIgnoredDuringExecution spec changes.

Expected behavior

There should be no diff when you do not change anything on the helm configuration, hence no upgrade with no pod rollover should happen.

Additional context We run this setup in a GitLab CI pipeline where a lot of rebases of the repo happen. We are using helmfile that basically only runs helm upgrade when there is no diff, this will always trigger a helm upgrade and rotate the pods. Because of the many rebases of our repo this will often create an unusable setup because pods are basically constantly rotating.

Is there any reason to put the revison into the labels and/or requiredDuringSchedulingIgnoredDuringExecution spec? From my standpoint there is no need for this and at least I've never seen a helm chart doing this.

stefanandres avatar Apr 19 '22 11:04 stefanandres

@stefanandres I will take a look at this, this week.

DandyDeveloper avatar Apr 25 '22 00:04 DandyDeveloper

@DandyDeveloper any news? I guess this issue is caused by https://github.com/DandyDeveloper/charts/pull/89 We're facing the same problem since this chart is used in argo-cd as a dependency.

ymatsiuk avatar Nov 18 '22 12:11 ymatsiuk