aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-init
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/mariadb-init')
-rw-r--r--kubernetes/common/mariadb-init/Chart.yaml2
-rw-r--r--kubernetes/common/mariadb-init/templates/configmap.yaml12
-rw-r--r--kubernetes/common/mariadb-init/templates/job.yaml13
-rw-r--r--kubernetes/common/mariadb-init/tests/job_test.yaml2
-rw-r--r--kubernetes/common/mariadb-init/values.yaml15
5 files changed, 24 insertions, 20 deletions
diff --git a/kubernetes/common/mariadb-init/Chart.yaml b/kubernetes/common/mariadb-init/Chart.yaml
index d1844916e0..5c29010fc3 100644
--- a/kubernetes/common/mariadb-init/Chart.yaml
+++ b/kubernetes/common/mariadb-init/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: Chart for MariaDB Galera init job
name: mariadb-init
-version: 13.0.2
+version: 13.0.5
dependencies:
- name: common
diff --git a/kubernetes/common/mariadb-init/templates/configmap.yaml b/kubernetes/common/mariadb-init/templates/configmap.yaml
index 6df329e8a5..5d33ae74c6 100644
--- a/kubernetes/common/mariadb-init/templates/configmap.yaml
+++ b/kubernetes/common/mariadb-init/templates/configmap.yaml
@@ -18,11 +18,7 @@ kind: ConfigMap
metadata:
name: {{ include "common.fullname" . }}
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 }}
data:
{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
---
@@ -32,11 +28,7 @@ kind: ConfigMap
metadata:
name: {{ include "common.fullname" . }}-dbscript
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 }}
data:
db_cmd.sh: |
{{ tpl .Values.dbScript . | indent 4 }}
diff --git a/kubernetes/common/mariadb-init/templates/job.yaml b/kubernetes/common/mariadb-init/templates/job.yaml
index d620bd2edc..bde0c77663 100644
--- a/kubernetes/common/mariadb-init/templates/job.yaml
+++ b/kubernetes/common/mariadb-init/templates/job.yaml
@@ -20,11 +20,10 @@ 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:
@@ -35,9 +34,7 @@ spec:
# 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" . }}
+ labels: {{- include "common.labels" . | nindent 8 }}
name: {{ include "common.name" . }}
spec:
{{ include "common.podSecurityContext" . | indent 6 | trim }}
diff --git a/kubernetes/common/mariadb-init/tests/job_test.yaml b/kubernetes/common/mariadb-init/tests/job_test.yaml
index 33cd1c2dc3..1f148ce142 100644
--- a/kubernetes/common/mariadb-init/tests/job_test.yaml
+++ b/kubernetes/common/mariadb-init/tests/job_test.yaml
@@ -36,7 +36,7 @@ tests:
content: mariadb-galera
- equal:
path: spec.template.spec.initContainers[0].image
- value: nexus3.onap.org:10001/onap/oom/readiness:6.0.3
+ value: nexus3.onap.org:10001/onap/oom/readiness:6.1.1
- equal:
path: spec.template.spec.initContainers[0].imagePullPolicy
value: IfNotPresent
diff --git a/kubernetes/common/mariadb-init/values.yaml b/kubernetes/common/mariadb-init/values.yaml
index 591477c5cf..f698321f67 100644
--- a/kubernetes/common/mariadb-init/values.yaml
+++ b/kubernetes/common/mariadb-init/values.yaml
@@ -106,6 +106,21 @@ config:
# externalSecret: some-secret-name
config_map: default
+# Annotations to control the execution and deletion of the job
+# Can be used to delete a job before an Upgrade
+#
+# jobAnnotations:
+# # In case of an ArgoCD deployment this Hook deletes the job before syncing
+# argocd.argoproj.io/hook: Sync
+# argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
+#
+# # In case of an Helm/Flux deployment this Hook deletes the job
+# # This is what defines this resource as a hook. Without this line, the
+# # job is considered part of the release.
+# "helm.sh/hook": "pre-upgrade,pre-rollback,post-install"
+# "helm.sh/hook-delete-policy": "before-hook-creation"
+# "helm.sh/hook-weight": "1"
+
securityContext:
user_id: 100
group_id: 65533