Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute cronjob with non-root user #2000

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.12 # chart version is effectively set by release-job
version: 3.5.13 # chart version is effectively set by release-job
appVersion: 3.5.10
keywords:
- iot-chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
restartPolicy: Never
containers:
- name: {{ .Chart.Name }}-pod-deletion-cost-cronjob
securityContext:
runAsUser: {{ .Values.global.podDeletionCostPatching.user }}
runAsGroup: {{ .Values.global.podDeletionCostPatching.group }}
image: {{ printf "%s:%s" .Values.global.podDeletionCostPatching.image.repository ( default .Values.global.podDeletionCostPatching.image.tag "latest" ) }}
imagePullPolicy: {{ .Values.global.podDeletionCostPatching.image.pullPolicy }}
command:
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ global:
# podDeletionCostPatching hold configuration for whether to patch "oldest" members of the Ditto cluster with higher
# k8s pod-deletion-cost annotations so that they are downed last when e.g. doing an upgrade
podDeletionCostPatching:
# user defines the user to run the pod-deletion-cost annotation patching job as
user: 1000
# group defines the group to run the pod-deletion-cost annotation patching job as
group: 1000
# enabled whether the pod-deletion-cost annotation patching should be enabled
enabled: true
# annotations defines k8s annotations to add to corresponding jobs
Expand Down
Loading