Browse Source

Merge pull request #13711 from waza-ari/emqx-13704-helm-add-pod-labels

feat(deploy): add ability to the helm chart to specify custom podLabels
Ivan Dyachkov 1 year ago
parent
commit
bbb326eb9e

+ 1 - 0
changes/feat-13711.en.md

@@ -0,0 +1 @@
+Added an option to specify custom `podLabels` when deploying via Helm chart.

+ 3 - 0
deploy/charts/emqx-enterprise/templates/StatefulSet.yaml

@@ -43,6 +43,9 @@ spec:
   template:
     metadata:
       labels:
+      {{- with .Values.podLabels }}
+          {{- toYaml . | nindent 8 }}
+      {{- end }}
         app: {{ include "emqx.name" . }}
         version: {{ .Chart.AppVersion }}
         app.kubernetes.io/name: {{ include "emqx.name" . }}

+ 4 - 0
deploy/charts/emqx-enterprise/values.yaml

@@ -43,8 +43,12 @@ priorityClassName:
 
 clusterDomain: cluster.local
 
+## Custom annotations to be added to the pods
 podAnnotations: {}
 
+## Custom labels to be added to the pods
+podLabels: {}
+
 # Pod deployment policy
 # value: OrderedReady | Parallel
 # To redeploy a chart with existing PVC(s), the value must be set to Parallel to avoid deadlock

+ 3 - 0
deploy/charts/emqx/templates/StatefulSet.yaml

@@ -43,6 +43,9 @@ spec:
   template:
     metadata:
       labels:
+      {{- with .Values.podLabels }}
+          {{- toYaml . | nindent 8 }}
+      {{- end }}
         app: {{ include "emqx.name" . }}
         version: {{ .Chart.AppVersion }}
         app.kubernetes.io/name: {{ include "emqx.name" . }}

+ 4 - 0
deploy/charts/emqx/values.yaml

@@ -43,8 +43,12 @@ priorityClassName:
 
 clusterDomain: cluster.local
 
+## Custom annotations to be added to the pods
 podAnnotations: {}
 
+## Custom labels to be added to the pods
+podLabels: {}
+
 # Pod deployment policy
 # value: OrderedReady | Parallel
 # To redeploy a chart with existing PVC(s), the value must be set to Parallel to avoid deadlock