Skip to content

Commit

Permalink
Merge pull request #1902 from kyberpunk/added-annotations-for-pod-del…
Browse files Browse the repository at this point in the history
…etion-cost-patching-jobs

Added option to add custom annotations to podDeletionCostPatching jobs.
  • Loading branch information
thjaeckle authored Feb 13, 2024
2 parents 593323b + bee20af commit ffdd3de
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deployment/helm/ditto/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: |
A digital twin is a virtual, cloud based, representation of his real world counterpart
(real world “Things”, e.g. devices like sensors, smart heating, connected cars, smart grids, EV charging stations etc).
type: application
version: 3.5.4-0 # chart version is effectively set by release-job
version: 3.5.5-0 # chart version is effectively set by release-job
appVersion: 3.5.2
keywords:
- iot-chart
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 ffdd3de

Please sign in to comment.