Skip to content

Commit

Permalink
Added option to add custom annotations to podDeletionCostPatching jobs.
Browse files Browse the repository at this point in the history
Signed-off-by: Vit Holasek <xvh@seznam.cz>
  • Loading branch information
kyberpunk committed Feb 12, 2024
1 parent 4a6011b commit 617d463
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Expand Up @@ -30,6 +30,10 @@ spec:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- with .Values.global.podDeletionCostPatching.annotations }}
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
spec:
{{- if .Values.rbac.enabled }}
serviceAccountName: {{ template "ditto.serviceAccountName" . }}
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/templates/hooks/pre-upgrade-job.yaml
Expand Up @@ -31,6 +31,10 @@ spec:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- with .Values.global.podDeletionCostPatching.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.rbac.enabled }}
serviceAccountName: {{ template "ditto.serviceAccountName" . }}
Expand Down
3 changes: 3 additions & 0 deletions deployment/helm/ditto/values.yaml
Expand Up @@ -172,6 +172,9 @@ global:
podDeletionCostPatching:
# enabled whether the pod-deletion-cost annotation patching should be enabled
enabled: true
# annotations defines k8s annotations to add to corresponding jobs
annotations: {}


## ----------------------------------------------------------------------------
## dbconfig for mongodb connections
Expand Down

0 comments on commit 617d463

Please sign in to comment.