aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/so
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2025-02-28 13:44:27 +0100
committerAndreas Geissler <andreas-geissler@telekom.de>2025-03-01 11:18:53 +0100
commit4aeb83993fc3c78554ed53b5ffbf35552634e4a6 (patch)
treedebbbf3cb8096c674754e01f431c6d54f8798375 /kubernetes/so
parent3efc75775a486e5116d73dd1180c461870edb51b (diff)
[COMMON] Add jobAnnotations as optional variables
- add Annotations to all job template metadata - make the jobAnnotations configurable via values.yaml Issue-ID: OOM-3254 Change-Id: I84a3a7e9a89ea272a239e7a86e9c615103c2c7e4 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Diffstat (limited to 'kubernetes/so')
-rwxr-xr-xkubernetes/so/Chart.yaml2
-rwxr-xr-xkubernetes/so/components/so-mariadb/Chart.yaml2
-rw-r--r--kubernetes/so/components/so-mariadb/templates/job.yaml9
-rwxr-xr-xkubernetes/so/components/so-mariadb/values.yaml15
4 files changed, 20 insertions, 8 deletions
diff --git a/kubernetes/so/Chart.yaml b/kubernetes/so/Chart.yaml
index 0c6b4a2f60..846b175070 100755
--- a/kubernetes/so/Chart.yaml
+++ b/kubernetes/so/Chart.yaml
@@ -17,7 +17,7 @@
apiVersion: v2
description: ONAP Service Orchestrator
name: so
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
diff --git a/kubernetes/so/components/so-mariadb/Chart.yaml b/kubernetes/so/components/so-mariadb/Chart.yaml
index f66f740b34..fb138b690f 100755
--- a/kubernetes/so/components/so-mariadb/Chart.yaml
+++ b/kubernetes/so/components/so-mariadb/Chart.yaml
@@ -16,7 +16,7 @@
apiVersion: v2
description: MariaDB Service
name: so-mariadb
-version: 13.0.0
+version: 13.0.1
dependencies:
- name: common
diff --git a/kubernetes/so/components/so-mariadb/templates/job.yaml b/kubernetes/so/components/so-mariadb/templates/job.yaml
index 4164f7d679..93660280cb 100644
--- a/kubernetes/so/components/so-mariadb/templates/job.yaml
+++ b/kubernetes/so/components/so-mariadb/templates/job.yaml
@@ -25,12 +25,9 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
- annotations:
- argocd.argoproj.io/hook: Sync
- argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
- helm.sh/hook: post-install,pre-upgrade,post-rollback
- helm.sh/hook-weight: "1"
- helm.sh/hook-delete-policy: before-hook-creation
+ {{- if .Values.jobAnnotations }}
+ annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }}
+ {{- end }}
spec:
backoffLimit: 20
template:
diff --git a/kubernetes/so/components/so-mariadb/values.yaml b/kubernetes/so/components/so-mariadb/values.yaml
index 86a6b063c8..dbbe03cdb5 100755
--- a/kubernetes/so/components/so-mariadb/values.yaml
+++ b/kubernetes/so/components/so-mariadb/values.yaml
@@ -212,3 +212,18 @@ readinessCheck:
wait_for:
services:
- '{{ include "common.mariadbService" . }}'
+
+# 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"