diff options
Diffstat (limited to 'kubernetes/common/etcd-init')
-rw-r--r-- | kubernetes/common/etcd-init/Chart.yaml | 2 | ||||
-rw-r--r-- | kubernetes/common/etcd-init/templates/job.yaml | 3 | ||||
-rw-r--r-- | kubernetes/common/etcd-init/values.yaml | 15 |
3 files changed, 19 insertions, 1 deletions
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: |