diff options
Diffstat (limited to 'kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl')
-rw-r--r-- | kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl b/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl index 101dc075f9..eefee769bd 100644 --- a/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl +++ b/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl @@ -254,6 +254,7 @@ post-processing. {{- $drNeedProvisioning := or .Values.drFeedConfig .Values.drSubConfig -}} {{- $dcaeName := print (include "common.fullname" .) }} {{- $dcaeLabel := (dict "dcaeMicroserviceName" $dcaeName) -}} +{{- $podLabels := default .Values.podLabels .labels -}} {{- $dot := . -}} apiVersion: apps/v1 kind: Deployment @@ -262,7 +263,11 @@ spec: replicas: 1 selector: {{- include "common.selectors" . | nindent 4 }} template: + {{- if $podLabels}} + metadata: {{- include "common.templateMetadata" (dict "dot" . "labels" $podLabels) | nindent 6 }} + {{- else }} metadata: {{- include "common.templateMetadata" . | nindent 6 }} + {{- end }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} |