helm / charts

⚠️(OBSOLETE) Curated applications for Kubernetes
Apache License 2.0
15.49k stars 16.78k forks source link

[stable/kafka] affinity rules are not reading the {{ .Release.Name }} #24543

Closed banicr closed 2 years ago

banicr commented 2 years ago

Describe the bug added affinity rules for kafka metrics pod but it is not reading {{ .Release.Name }} from the values file

        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app.kubernetes.io/name
                    operator: In
                    values:
                      - kafka
                  - key: app.kubernetes.io/instance
                    operator: In
                    values:
                      - "{{ .Release.Name }}"
              topologyKey: `"kubernetes.io/hostname"

Version of Helm and Kubernetes: Helm version: version.BuildInfo{Version:"v3.5.0", GitCommit:"32c22239423b3b4ba6706d450bd044baffdcf9e6", GitTreeState:"clean", GoVersion:"go1.15.6"} Kubernetes version: Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5+vmware.1", GitCommit:"f4553304874c3b89584280a5ac1b005d57c725a8", GitTreeState:"clean", BuildDate:"2021-03-22T17:07:14Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.11+vmware.1", GitCommit:"581335ed759cada5037cc08960ce95d73170087f", GitTreeState:"clean", BuildDate:"2021-09-17T00:48:38Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}

What you expected to happen: it should read the release.name

How to reproduce it (as minimally and precisely as possible): add affinity rules to the kafka metrics pod like below and install the chart

        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: app.kubernetes.io/name
                    operator: In
                    values:
                      - kafka
                  - key: app.kubernetes.io/instance
                    operator: In
                    values:
                      - "{{ .Release.Name }}"
              topologyKey: "kubernetes.io/hostname"

Any help would be appreciated

banicr commented 2 years ago

I checked the kafka exporter deployment.yaml file, the affinity template is not reading the common.tplvalues.

bridgetkromhout commented 2 years ago

Hi, @banicr - If your question applies to the Bitnami helm chart for Kafka, please see https://github.com/bitnami/charts/tree/master/bitnami/kafka and open an issue there if desired. This issue queue will not receive an answer. Thanks.