bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.6k stars 8.98k forks source link

[bitnami/redis] persistence.labels are ignored #27479

Open monotek opened 1 week ago

monotek commented 1 week ago

Name and Version

bitnami/redis

What architecture are you using?

amd64

What steps will reproduce the bug?

helm template bitnami/redis --set master.persistence.labels.foo=bar

Are you using any custom parameters or values?

See above.

Value should be the right one. See: https://github.com/bitnami/charts/blob/main/bitnami/redis/templates/replicas/application.yaml#L538C93-L538C118

What is the expected behavior?

Label should be added to pvc:

  volumeClaimTemplates:
    - apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: redis-data
        labels:
          app.kubernetes.io/instance: release-name
          app.kubernetes.io/name: redis
          app.kubernetes.io/component: replica
          foo: bar
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"

What do you see instead?

only the default labels are added:

  volumeClaimTemplates:
    - apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: redis-data
        labels:
          app.kubernetes.io/instance: release-name
          app.kubernetes.io/name: redis
          app.kubernetes.io/component: replica
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"

Additional information

Same happens if you use sentinel.

javsalgar commented 1 week ago

Hi!

Thank you so much for reporting. Indeed, it seems that there's a missing reference to the persistence labels in the volumeClaimTemplates. As you discovered the issue, would you like to submit a PR?