Add podLabels at the controller & dashboard level

This aligns with how podAnnotations works and allows for unique labels for each application at the pod level

Signed-off-by: mitchell amihod <4623+meeech@users.noreply.github.com>
This commit is contained in:
mitchell amihod 2024-05-04 17:05:33 -04:00
parent 35bc505bec
commit caa86078de
3 changed files with 6 additions and 2 deletions

View file

@ -34,7 +34,7 @@ spec:
labels: labels:
{{- include "argo-rollouts.selectorLabels" . | nindent 8 }} {{- include "argo-rollouts.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: {{ .Values.controller.component }} app.kubernetes.io/component: {{ .Values.controller.component }}
{{- range $key, $value := .Values.podLabels }} {{- range $key, $value := (mergeOverwrite (deepCopy .Values.podLabels) .Values.controller.podLabels) }}
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
spec: spec:

View file

@ -35,7 +35,7 @@ spec:
labels: labels:
{{- include "argo-rollouts.selectorLabels" . | nindent 8 }} {{- include "argo-rollouts.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: {{ .Values.dashboard.component }} app.kubernetes.io/component: {{ .Values.dashboard.component }}
{{- range $key, $value := .Values.podLabels }} {{- range $key, $value := (mergeOverwrite (deepCopy .Values.podLabels) .Values.dashboard.podLabels) }}
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
spec: spec:

View file

@ -53,6 +53,8 @@ controller:
deploymentLabels: {} deploymentLabels: {}
# -- Annotations to be added to application controller pods # -- Annotations to be added to application controller pods
podAnnotations: {} podAnnotations: {}
# Labels to be added to the application controller pods
podLabels: {}
# -- [Node selector] # -- [Node selector]
nodeSelector: {} nodeSelector: {}
# -- [Tolerations] for use with node taints # -- [Tolerations] for use with node taints
@ -295,6 +297,8 @@ dashboard:
deploymentLabels: {} deploymentLabels: {}
# -- Annotations to be added to application dashboard pods # -- Annotations to be added to application dashboard pods
podAnnotations: {} podAnnotations: {}
# Labels to be added to the application dashboard pods
podLabels: {}
# -- [Node selector] # -- [Node selector]
nodeSelector: {} nodeSelector: {}
# -- [Tolerations] for use with node taints # -- [Tolerations] for use with node taints