DandyDeveloper / charts

Various helm charts migrated from [helm/stable] due to deprecation
https://dandydeveloper.github.io/charts
Apache License 2.0
156 stars 143 forks source link

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

Closed stefanandres closed 1 year ago

stefanandres commented 2 years ago

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:

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.

DandyDeveloper commented 2 years ago

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

ymatsiuk commented 1 year ago

@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.