Explorar el Código

Allow setting custom kubernetes labels when using the helm chart

Arie Peterson hace 3 años
padre
commit
966670fe70
Se han modificado 2 ficheros con 12 adiciones y 0 borrados
  1. 6 0
      helm/wekan/templates/deployment.yaml
  2. 6 0
      helm/wekan/values.yaml

+ 6 - 0
helm/wekan/templates/deployment.yaml

@@ -8,6 +8,9 @@ metadata:
     component: wekan
     component: wekan
     release: {{ .Release.Name }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.deploymentLabels }}
+    {{- toYaml .Values.deploymentLabels | nindent 4 }}
+    {{- end }}
 spec:
 spec:
   replicas: {{ .Values.replicaCount }}
   replicas: {{ .Values.replicaCount }}
   selector:
   selector:
@@ -22,6 +25,9 @@ spec:
         app: {{ template "wekan.name" . }}
         app: {{ template "wekan.name" . }}
         component: wekan
         component: wekan
         release: {{ .Release.Name }}
         release: {{ .Release.Name }}
+        {{- if .Values.podLabels }}
+        {{- toYaml .Values.podLabels | nindent 8 }}
+        {{- end }}
     spec:
     spec:
       serviceAccountName: {{ template "wekan.serviceAccountName" . }}
       serviceAccountName: {{ template "wekan.serviceAccountName" . }}
       containers:
       containers:

+ 6 - 0
helm/wekan/values.yaml

@@ -103,6 +103,12 @@ autoscaling:
     ##
     ##
     targetCPUUtilizationPercentage: 80
     targetCPUUtilizationPercentage: 80
 
 
+# Optional custom labels for the deployment resource.
+deploymentLabels: {}
+
+# Optional custom labels for the pods created by the deployment.
+podLabels: {}
+
 # ------------------------------------------------------------------------------
 # ------------------------------------------------------------------------------
 # MongoDB:
 # MongoDB:
 # ------------------------------------------------------------------------------
 # ------------------------------------------------------------------------------