Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4f6d407

Browse files
authoredAug 16, 2021
Merge pull request #7 from codecentric/fix-cronjob-user
Fix cronjob user
2 parents 76c56f9 + 3f971a9 commit 4f6d407

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed
 

‎Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ RUN curl -fsSLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/releas
88
chmod +x kubectl && \
99
mv kubectl /usr/local/bin/
1010

11-
RUN addgroup -S cop && adduser -S cop -G cop
11+
RUN addgroup -g 1001 -S cop && adduser -u 1001 -S cop -G cop
1212
USER cop

‎charts/cluster-overprovisioner/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: cluster-overprovisioner
33
description: Helm chart, that enables scheduled scaling of a target resource, intended to be add overprovisioning to an autoscaling k8s cluster.
44
type: application
5-
version: 0.4.6
5+
version: 0.4.7
66
appVersion: "1.16.0"
77
keywords:
88
- cluster-autoscaler

‎charts/cluster-overprovisioner/templates/cpa-cronjob.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ spec:
2727
imagePullPolicy: "{{ $pullPolicy }}"
2828
name: {{ $schedule.name }}
2929
command: ["/app/configmap.sh"]
30+
securityContext:
31+
runAsUser: 1001
32+
runAsGroup: 1001
33+
fsGroup: 1001
3034
volumeMounts:
3135
- name: script
3236
mountPath: /app/

0 commit comments

Comments
 (0)
Please sign in to comment.