[template] Add commonLabels to pod templates (#14806)

* [template] Add commonLabels to pod templates

---------

Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
Fran Mulero
2023-02-13 10:16:58 +01:00
committed by GitHub
parent c7aa17ee9e
commit 3b03586267
3 changed files with 9 additions and 0 deletions

View File

@@ -28,6 +28,9 @@ spec:
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "%%TEMPLATE_NAME%%.serviceAccountName" . }}
{{- include "%%TEMPLATE_NAME%%.imagePullSecrets" . | nindent 6 }}

View File

@@ -31,6 +31,9 @@ spec:
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "%%TEMPLATE_NAME%%.serviceAccountName" . }}
{{- include "%%TEMPLATE_NAME%%.imagePullSecrets" . | nindent 6 }}

View File

@@ -33,6 +33,9 @@ spec:
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.%%MAIN_OBJECT_BLOCK%%.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "%%TEMPLATE_NAME%%.serviceAccountName" . }}
{{- include "%%TEMPLATE_NAME%%.imagePullSecrets" . | nindent 6 }}