aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2024-12-12 11:34:05 +0000
committerGerrit Code Review <gerrit@onap.org>2024-12-12 11:34:05 +0000
commitbaa6822ac0435a5b4d2e2fc490e238163bedb34c (patch)
treed20410331bd422ef20c8f6a7829be88d43c0bb68 /kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
parent5f8008ea8d1aa700a26b7ced5d43aacbcf23107a (diff)
parent23428032527583798d5e42aa96555728cc71a06d (diff)
Merge "[AAI] Fix Kyverno Policy violations"
Diffstat (limited to 'kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml')
-rw-r--r--kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml33
1 files changed, 5 insertions, 28 deletions
diff --git a/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml b/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
index 3f0c4e11e5..1cc431c94f 100644
--- a/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
+++ b/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
@@ -41,11 +41,7 @@ kind: Job
metadata:
name: {{ include "common.fullname" . }}-db-backup
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}-job
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 4 }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
"helm.sh/hook-weight": "2"
@@ -54,38 +50,19 @@ spec:
backoffLimit: 20
template:
metadata:
- labels:
- app: {{ include "common.name" . }}-job
- release: {{ include "common.release" . }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 8 }}
name: {{ include "common.name" . }}
spec:
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
{{- if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
- - command:
- - /bin/bash
- - -c
- - /app/ready.py --service-name {{ .Values.global.cassandra.serviceName }}
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-db-backup-readiness
- resources:
- limits:
- cpu: "100m"
- memory: "500Mi"
- requests:
- cpu: "3m"
- memory: "20Mi"
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.waitForCassandraService ) | indent 6 | trim}}
{{- end }}
containers:
- name: {{ include "common.name" . }}-db-backup-job
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
command:
- sh
args: