aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres-init/templates/job.yaml
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2025-02-24 10:55:57 +0000
committerGerrit Code Review <gerrit@onap.org>2025-02-24 10:55:57 +0000
commit45df5ccf387520728ef69cead882333696ed3a90 (patch)
treed5f43d73cf78a619873f118ea3ddc2bb845bddc4 /kubernetes/common/postgres-init/templates/job.yaml
parente77ed7cd5b8a5d2d096eb8d8bb7721efe67b449b (diff)
parentd9c3cc6c8dc375df464fd0cdf009572d7bc3831b (diff)
Merge "[COMMON] Add label template and make jobs GitOps ready"
Diffstat (limited to 'kubernetes/common/postgres-init/templates/job.yaml')
-rw-r--r--kubernetes/common/postgres-init/templates/job.yaml22
1 files changed, 8 insertions, 14 deletions
diff --git a/kubernetes/common/postgres-init/templates/job.yaml b/kubernetes/common/postgres-init/templates/job.yaml
index a2f7e12274..c7b1cb2052 100644
--- a/kubernetes/common/postgres-init/templates/job.yaml
+++ b/kubernetes/common/postgres-init/templates/job.yaml
@@ -19,24 +19,18 @@ kind: Job
metadata:
name: {{ include "common.fullname" . }}-config-job
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+ {{- if .Values.jobAnnotations }}
+ annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }}
+ {{- end }}
spec:
backoffLimit: 20
template:
metadata:
- annotations:
- # Workarround to exclude K8S API from istio communication
- # as init-container (readinessCheck) does not work with the
- # Istio CNI plugin, see:
- # (https://istio.io/latest/docs/setup/additional-setup/cni/#compatibility-with-application-init-containers)
- traffic.sidecar.istio.io/excludeOutboundPorts: "443"
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ {{- if .Values.jobPodAnnotations }}
+ annotations: {{- include "common.tplValue" (dict "value" .Values.jobPodAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ labels: {{- include "common.labels" . | nindent 8 }}
name: {{ include "common.name" . }}
spec:
{{ include "common.podSecurityContext" . | indent 6 | trim }}