diff options
author | 2025-03-02 13:58:22 +0000 | |
---|---|---|
committer | 2025-03-02 13:58:22 +0000 | |
commit | 0060da424b15edf2d389d9898395d5e8bd19ca6a (patch) | |
tree | 2421fa7e8134502dfe10c28b20c9764bf911a51c /kubernetes | |
parent | ec6ebbd6049f0e9af38869c6a6af089fc04a8a29 (diff) | |
parent | 4aeb83993fc3c78554ed53b5ffbf35552634e4a6 (diff) |
Merge "[COMMON] Add jobAnnotations as optional variables"
Diffstat (limited to 'kubernetes')
42 files changed, 305 insertions, 48 deletions
diff --git a/kubernetes/authentication/values.yaml b/kubernetes/authentication/values.yaml index 32a11a5ac0..79f23295cd 100644 --- a/kubernetes/authentication/values.yaml +++ b/kubernetes/authentication/values.yaml @@ -45,14 +45,14 @@ onap-keycloak-config-cli: pullSecrets: - name: onap-docker-registry-key - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - argocd.argoproj.io/hook: Sync - argocd.argoproj.io/hook-delete-policy: BeforeHookCreation - helm.sh/hook: post-install,pre-upgrade,pre-rollback - helm.sh/hook-weight: "1" - helm.sh/hook-delete-policy: before-hook-creation +# annotations: +# # This is what defines this resource as a hook. Without this line, the +# # job is considered part of the release. +# argocd.argoproj.io/hook: Sync +# argocd.argoproj.io/hook-delete-policy: BeforeHookCreation +# helm.sh/hook: post-install,pre-upgrade,pre-rollback +# helm.sh/hook-weight: "1" +# helm.sh/hook-delete-policy: before-hook-creation #existingSecret: "keycloak-keycloakx-admin-creds" env: diff --git a/kubernetes/common/etcd-init/Chart.yaml b/kubernetes/common/etcd-init/Chart.yaml index 166b4172d3..0ce9c4fc46 100644 --- a/kubernetes/common/etcd-init/Chart.yaml +++ b/kubernetes/common/etcd-init/Chart.yaml @@ -17,7 +17,7 @@ apiVersion: v2 description: Chart for etcd init job name: etcd-init -version: 13.0.0 +version: 13.0.1 dependencies: - name: common diff --git a/kubernetes/common/etcd-init/templates/job.yaml b/kubernetes/common/etcd-init/templates/job.yaml index 71f912e201..30e37ea43e 100644 --- a/kubernetes/common/etcd-init/templates/job.yaml +++ b/kubernetes/common/etcd-init/templates/job.yaml @@ -23,6 +23,9 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ include "common.release" . }} heritage: {{ .Release.Service }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: {{ .Values.backoffLimit }} template: diff --git a/kubernetes/common/etcd-init/values.yaml b/kubernetes/common/etcd-init/values.yaml index 33e34fd086..2af39ed573 100644 --- a/kubernetes/common/etcd-init/values.yaml +++ b/kubernetes/common/etcd-init/values.yaml @@ -55,6 +55,21 @@ config: appRole: role keyPrefix: key +# 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" + flavor: small resources: small: diff --git a/kubernetes/common/mariadb-init/Chart.yaml b/kubernetes/common/mariadb-init/Chart.yaml index 7053ad8728..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.4 +version: 13.0.5 dependencies: - name: common diff --git a/kubernetes/common/mariadb-init/values.yaml b/kubernetes/common/mariadb-init/values.yaml index 897364fa11..f698321f67 100644 --- a/kubernetes/common/mariadb-init/values.yaml +++ b/kubernetes/common/mariadb-init/values.yaml @@ -106,10 +106,20 @@ config: # externalSecret: some-secret-name config_map: default -jobAnnotations: - "helm.sh/hook": "pre-upgrade,pre-rollback,post-install" - "helm.sh/hook-delete-policy": "before-hook-creation" - "helm.sh/hook-weight": "1" +# 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 diff --git a/kubernetes/common/mongodb-init/Chart.yaml b/kubernetes/common/mongodb-init/Chart.yaml index 7757e73ba0..7fe47ca331 100644 --- a/kubernetes/common/mongodb-init/Chart.yaml +++ b/kubernetes/common/mongodb-init/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v2 description: Chart for MongoDB init job name: mongodb-init -version: 13.0.4 +version: 13.0.5 dependencies: - name: common diff --git a/kubernetes/common/mongodb-init/values.yaml b/kubernetes/common/mongodb-init/values.yaml index e2df2ff786..1ab74c635c 100644 --- a/kubernetes/common/mongodb-init/values.yaml +++ b/kubernetes/common/mongodb-init/values.yaml @@ -110,7 +110,17 @@ wait_for_job_container: containers: - '{{ include "common.name" . }}-setup-db' -jobAnnotations: - "helm.sh/hook": "pre-upgrade,pre-rollback,post-install" - "helm.sh/hook-delete-policy": "before-hook-creation" - "helm.sh/hook-weight": "1" +# 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" diff --git a/kubernetes/common/postgres-init/Chart.yaml b/kubernetes/common/postgres-init/Chart.yaml index 8cf9707157..2f1971c77a 100644 --- a/kubernetes/common/postgres-init/Chart.yaml +++ b/kubernetes/common/postgres-init/Chart.yaml @@ -17,8 +17,7 @@ apiVersion: v2 description: Chart for Postgres init job name: postgres-init -version: 13.0.5 - +version: 13.0.6 dependencies: - name: common diff --git a/kubernetes/common/postgres-init/values.yaml b/kubernetes/common/postgres-init/values.yaml index dbe28754f6..103ef047da 100644 --- a/kubernetes/common/postgres-init/values.yaml +++ b/kubernetes/common/postgres-init/values.yaml @@ -110,10 +110,20 @@ wait_for_job_container: containers: - '{{ include "common.name" . }}-update-config' -jobAnnotations: - "helm.sh/hook": "pre-upgrade,pre-rollback,post-install" - "helm.sh/hook-delete-policy": "before-hook-creation" - "helm.sh/hook-weight": "1" +# 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" jobPodAnnotations: # Workarround to exclude K8S API from istio communication diff --git a/kubernetes/policy/Chart.yaml b/kubernetes/policy/Chart.yaml index 65a46799a3..a49530b18a 100644 --- a/kubernetes/policy/Chart.yaml +++ b/kubernetes/policy/Chart.yaml @@ -19,7 +19,7 @@ apiVersion: v2 description: ONAP Policy name: policy -version: 16.0.0 +version: 16.0.1 dependencies: - name: common diff --git a/kubernetes/policy/templates/job.yaml b/kubernetes/policy/templates/job.yaml index 6fde5069c2..a21077249b 100755 --- a/kubernetes/policy/templates/job.yaml +++ b/kubernetes/policy/templates/job.yaml @@ -26,6 +26,9 @@ metadata: labels: app: {{ include "common.name" . }}-pg-init release: {{ include "common.release" . }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: template: metadata: @@ -113,6 +116,9 @@ metadata: labels: app: {{ include "common.name" . }}-pg-migrator-config release: {{ include "common.release" . }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: template: metadata: diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml index 407d990400..6e813825a0 100644 --- a/kubernetes/policy/values.yaml +++ b/kubernetes/policy/values.yaml @@ -279,3 +279,18 @@ serviceAccount: nameOverride: policy roles: - read + +# 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" diff --git a/kubernetes/sdc/Chart.yaml b/kubernetes/sdc/Chart.yaml index 54b71b4794..d2dc711b00 100644 --- a/kubernetes/sdc/Chart.yaml +++ b/kubernetes/sdc/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: Service Design and Creation Umbrella Helm charts name: sdc -version: 13.0.4 +version: 13.0.5 dependencies: - name: common diff --git a/kubernetes/sdc/components/sdc-be/Chart.yaml b/kubernetes/sdc/components/sdc-be/Chart.yaml index bb385a058e..2bb7f3be8b 100644 --- a/kubernetes/sdc/components/sdc-be/Chart.yaml +++ b/kubernetes/sdc/components/sdc-be/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: ONAP Service Design and Creation Backend API name: sdc-be -version: 13.0.3 +version: 13.0.4 dependencies: - name: common diff --git a/kubernetes/sdc/components/sdc-be/templates/job.yaml b/kubernetes/sdc/components/sdc-be/templates/job.yaml index 02d04154e9..c9fb2e8337 100644 --- a/kubernetes/sdc/components/sdc-be/templates/job.yaml +++ b/kubernetes/sdc/components/sdc-be/templates/job.yaml @@ -17,7 +17,15 @@ apiVersion: batch/v1 kind: Job -metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + release: {{ include "common.release" . }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/sdc/components/sdc-be/values.yaml b/kubernetes/sdc/components/sdc-be/values.yaml index 3f82c98c98..c57b252c7c 100644 --- a/kubernetes/sdc/components/sdc-be/values.yaml +++ b/kubernetes/sdc/components/sdc-be/values.yaml @@ -314,4 +314,20 @@ updateStrategy: maxUnavailable: 0 # The number of pods that can be created above the desired amount of pods during an update maxSurge: 1 + +# 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" + #END diff --git a/kubernetes/sdc/components/sdc-cs/Chart.yaml b/kubernetes/sdc/components/sdc-cs/Chart.yaml index 8edbfbbb84..9fc41bb6da 100644 --- a/kubernetes/sdc/components/sdc-cs/Chart.yaml +++ b/kubernetes/sdc/components/sdc-cs/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: ONAP Service Design and Creation Cassandra name: sdc-cs -version: 13.0.2 +version: 13.0.3 dependencies: - name: common diff --git a/kubernetes/sdc/components/sdc-cs/templates/job.yaml b/kubernetes/sdc/components/sdc-cs/templates/job.yaml index c715342d5e..8f56851dcf 100644 --- a/kubernetes/sdc/components/sdc-cs/templates/job.yaml +++ b/kubernetes/sdc/components/sdc-cs/templates/job.yaml @@ -17,7 +17,15 @@ apiVersion: batch/v1 kind: Job -metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + release: {{ include "common.release" . }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/sdc/components/sdc-cs/values.yaml b/kubernetes/sdc/components/sdc-cs/values.yaml index 0b564d4419..d46c474542 100644 --- a/kubernetes/sdc/components/sdc-cs/values.yaml +++ b/kubernetes/sdc/components/sdc-cs/values.yaml @@ -82,6 +82,21 @@ config: maxHeapSize: "1536M" heapNewSize: "512M" +# 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" + #environment file env: name: AUTO diff --git a/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml b/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml index a41f386b8d..30cced108c 100644 --- a/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml +++ b/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: ONAP Service Design and Creation Onboarding API name: sdc-onboarding-be -version: 13.0.3 +version: 13.0.4 dependencies: - name: repositoryGenerator diff --git a/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml b/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml index 8ceca385a4..6a6a9781d1 100644 --- a/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml +++ b/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml @@ -17,7 +17,15 @@ apiVersion: batch/v1 kind: Job -metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + release: {{ include "common.release" . }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml index 07e3bead35..e2aeccbf27 100644 --- a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml +++ b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml @@ -235,3 +235,18 @@ metrics: path: /onboarding-api/v1.0/actuator/prometheus basicAuth: enabled: false + +# 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" diff --git a/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml b/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml index ea2d0f2443..725104fc63 100644 --- a/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml +++ b/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml @@ -17,7 +17,7 @@ apiVersion: v2 description: ONAP Service Design and Creation Workflow Designer backend name: sdc-wfd-be -version: 13.0.1 +version: 13.0.2 dependencies: - name: repositoryGenerator diff --git a/kubernetes/sdc/components/sdc-wfd-be/templates/job.yaml b/kubernetes/sdc/components/sdc-wfd-be/templates/job.yaml index 5b6762b78f..32eb8572ab 100644 --- a/kubernetes/sdc/components/sdc-wfd-be/templates/job.yaml +++ b/kubernetes/sdc/components/sdc-wfd-be/templates/job.yaml @@ -18,7 +18,15 @@ {{ if .Values.initJob.enabled }} apiVersion: batch/v1 kind: Job -metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + release: {{ include "common.release" . }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/sdc/components/sdc-wfd-be/values.yaml b/kubernetes/sdc/components/sdc-wfd-be/values.yaml index 4d39ce02d5..5e0b7623ae 100644 --- a/kubernetes/sdc/components/sdc-wfd-be/values.yaml +++ b/kubernetes/sdc/components/sdc-wfd-be/values.yaml @@ -171,3 +171,18 @@ updateStrategy: maxUnavailable: 0 # The number of pods that can be created above the desired amount of pods during an update maxSurge: 1 + +# 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" diff --git a/kubernetes/sdnc/Chart.yaml b/kubernetes/sdnc/Chart.yaml index 2e0aa6ed8b..02a3681fad 100644 --- a/kubernetes/sdnc/Chart.yaml +++ b/kubernetes/sdnc/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: SDN Controller name: sdnc -version: 15.1.0 +version: 15.1.1 dependencies: - name: common diff --git a/kubernetes/sdnc/templates/job.yaml b/kubernetes/sdnc/templates/job.yaml index ffd578f3f1..4a7ca8a2ab 100755 --- a/kubernetes/sdnc/templates/job.yaml +++ b/kubernetes/sdnc/templates/job.yaml @@ -25,6 +25,9 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ include "common.release" . }} heritage: {{ .Release.Service }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/sdnc/templates/sdnrdb-init-job.yaml b/kubernetes/sdnc/templates/sdnrdb-init-job.yaml index 1845f6cc9f..0b630e0aa8 100755 --- a/kubernetes/sdnc/templates/sdnrdb-init-job.yaml +++ b/kubernetes/sdnc/templates/sdnrdb-init-job.yaml @@ -16,7 +16,17 @@ {{ if .Values.config.sdnr.enabled -}} apiVersion: batch/v1 kind: Job -metadata: {{- include "common.resourceMetadata" (dict "suffix" "sdnrdb-init-job" "dot" . ) | nindent 2 }} +metadata: + name: {{ include "common.fullname" . }}-sdnrdb-init-job + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ include "common.release" . }} + heritage: {{ .Release.Service }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 7060cae475..69c81f8087 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -412,6 +412,20 @@ config: # Strimzi KafkaUser/Topic config on top level kafkaUser: *kafkaUser +# 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" # dependency / sub-chart configuration network-name-gen: 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" diff --git a/kubernetes/uui/Chart.yaml b/kubernetes/uui/Chart.yaml index 0d1d7f2f6f..1b3ca07032 100644 --- a/kubernetes/uui/Chart.yaml +++ b/kubernetes/uui/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: ONAP uui name: uui -version: 15.0.0 +version: 15.0.1 dependencies: - name: common diff --git a/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml b/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml index 9c499132a9..639cad158a 100644 --- a/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml +++ b/kubernetes/uui/components/uui-intent-analysis/templates/job.yaml @@ -24,6 +24,9 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ include "common.release" . }} heritage: {{ .Release.Service }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/uui/components/uui-intent-analysis/values.yaml b/kubernetes/uui/components/uui-intent-analysis/values.yaml index a930e50b1c..991c42a927 100644 --- a/kubernetes/uui/components/uui-intent-analysis/values.yaml +++ b/kubernetes/uui/components/uui-intent-analysis/values.yaml @@ -124,3 +124,17 @@ resources: memory: "1Gi" unlimited: {} +# 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" diff --git a/kubernetes/uui/components/uui-llm-adaptation/templates/job.yaml b/kubernetes/uui/components/uui-llm-adaptation/templates/job.yaml index 90d6d63dab..efbcce2c4e 100644 --- a/kubernetes/uui/components/uui-llm-adaptation/templates/job.yaml +++ b/kubernetes/uui/components/uui-llm-adaptation/templates/job.yaml @@ -24,6 +24,9 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ include "common.release" . }} heritage: {{ .Release.Service }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/uui/components/uui-llm-adaptation/values.yaml b/kubernetes/uui/components/uui-llm-adaptation/values.yaml index cda22163db..27068ac930 100644 --- a/kubernetes/uui/components/uui-llm-adaptation/values.yaml +++ b/kubernetes/uui/components/uui-llm-adaptation/values.yaml @@ -124,3 +124,17 @@ resources: memory: "1Gi" unlimited: {} +# 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" diff --git a/kubernetes/uui/components/uui-server/Chart.yaml b/kubernetes/uui/components/uui-server/Chart.yaml index 034768256f..e5677aa216 100644 --- a/kubernetes/uui/components/uui-server/Chart.yaml +++ b/kubernetes/uui/components/uui-server/Chart.yaml @@ -17,7 +17,7 @@ apiVersion: v2 description: ONAP uui server name: uui-server -version: 15.0.0 +version: 15.0.1 dependencies: - name: common diff --git a/kubernetes/uui/components/uui-server/templates/job.yaml b/kubernetes/uui/components/uui-server/templates/job.yaml index e995c58a16..50cc0244c2 100644 --- a/kubernetes/uui/components/uui-server/templates/job.yaml +++ b/kubernetes/uui/components/uui-server/templates/job.yaml @@ -15,7 +15,15 @@ # apiVersion: batch/v1 kind: Job -metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + release: {{ include "common.release" . }} + {{- if .Values.jobAnnotations }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/uui/components/uui-server/values.yaml b/kubernetes/uui/components/uui-server/values.yaml index 15cce631ca..28da40a7dd 100644 --- a/kubernetes/uui/components/uui-server/values.yaml +++ b/kubernetes/uui/components/uui-server/values.yaml @@ -171,3 +171,18 @@ securityContext: wait_for_job_container: containers: - '{{ include "common.name" . }}-job' + +# 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" |