Skip to content

Commit 2cc3c1a

Browse files
authoredDec 6, 2024··
Merge pull request #77 from steadybit/refa/helm-no-hardcoded-uid
refa: avoid hard-coded uid in helm chart
2 parents 73f49ba + bf1fe4e commit 2cc3c1a

File tree

4 files changed

+63
-46
lines changed

4 files changed

+63
-46
lines changed
 

‎charts/steadybit-extension-http/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: steadybit-extension-http
33
description: Steadybit action implementation to check HTTP endpoints.
4-
version: 1.1.15
4+
version: 1.1.16
55
appVersion: v1.0.22
66
home: https://www.steadybit.com/
77
icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png

‎charts/steadybit-extension-http/templates/deployment.yaml

+3-8
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,10 @@ spec:
103103
httpGet:
104104
path: /health/readiness
105105
port: 8081
106+
{{- with .Values.containerSecurityContext }}
106107
securityContext:
107-
readOnlyRootFilesystem: true
108-
runAsNonRoot: true
109-
runAsUser: 10000
110-
runAsGroup: 10000
111-
allowPrivilegeEscalation: false
112-
capabilities:
113-
drop:
114-
- ALL
108+
{{- toYaml . | nindent 12 }}
109+
{{- end }}
115110
volumes:
116111
{{- include "extensionlib.deployment.volumes" (list .) | nindent 8 }}
117112
serviceAccountName: {{ .Values.serviceAccount.name }}

‎charts/steadybit-extension-http/tests/__snapshot__/deployment_test.yaml.snap

+47-36
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ manifest should match snapshot using podAnnotations and Labels:
7878
drop:
7979
- ALL
8080
readOnlyRootFilesystem: true
81-
runAsGroup: 10000
82-
runAsNonRoot: true
83-
runAsUser: 10000
8481
volumeMounts: null
82+
securityContext:
83+
runAsNonRoot: true
84+
seccompProfile:
85+
type: RuntimeDefault
8586
serviceAccountName: steadybit-extension-http
8687
volumes: null
8788
manifest should match snapshot with TLS:
@@ -166,13 +167,14 @@ manifest should match snapshot with TLS:
166167
drop:
167168
- ALL
168169
readOnlyRootFilesystem: true
169-
runAsGroup: 10000
170-
runAsNonRoot: true
171-
runAsUser: 10000
172170
volumeMounts:
173171
- mountPath: /etc/extension/certificates/server-cert
174172
name: certificate-server-cert
175173
readOnly: true
174+
securityContext:
175+
runAsNonRoot: true
176+
seccompProfile:
177+
type: RuntimeDefault
176178
serviceAccountName: steadybit-extension-http
177179
volumes:
178180
- name: certificate-server-cert
@@ -264,10 +266,11 @@ manifest should match snapshot with extra env vars:
264266
drop:
265267
- ALL
266268
readOnlyRootFilesystem: true
267-
runAsGroup: 10000
268-
runAsNonRoot: true
269-
runAsUser: 10000
270269
volumeMounts: null
270+
securityContext:
271+
runAsNonRoot: true
272+
seccompProfile:
273+
type: RuntimeDefault
271274
serviceAccountName: steadybit-extension-http
272275
volumes: null
273276
manifest should match snapshot with extra labels:
@@ -350,10 +353,11 @@ manifest should match snapshot with extra labels:
350353
drop:
351354
- ALL
352355
readOnlyRootFilesystem: true
353-
runAsGroup: 10000
354-
runAsNonRoot: true
355-
runAsUser: 10000
356356
volumeMounts: null
357+
securityContext:
358+
runAsNonRoot: true
359+
seccompProfile:
360+
type: RuntimeDefault
357361
serviceAccountName: steadybit-extension-http
358362
volumes: null
359363
manifest should match snapshot with mutual TLS:
@@ -440,16 +444,17 @@ manifest should match snapshot with mutual TLS:
440444
drop:
441445
- ALL
442446
readOnlyRootFilesystem: true
443-
runAsGroup: 10000
444-
runAsNonRoot: true
445-
runAsUser: 10000
446447
volumeMounts:
447448
- mountPath: /etc/extension/certificates/client-cert-a
448449
name: certificate-client-cert-a
449450
readOnly: true
450451
- mountPath: /etc/extension/certificates/server-cert
451452
name: certificate-server-cert
452453
readOnly: true
454+
securityContext:
455+
runAsNonRoot: true
456+
seccompProfile:
457+
type: RuntimeDefault
453458
serviceAccountName: steadybit-extension-http
454459
volumes:
455460
- name: certificate-client-cert-a
@@ -544,10 +549,11 @@ manifest should match snapshot with mutual TLS using containerPaths:
544549
drop:
545550
- ALL
546551
readOnlyRootFilesystem: true
547-
runAsGroup: 10000
548-
runAsNonRoot: true
549-
runAsUser: 10000
550552
volumeMounts: null
553+
securityContext:
554+
runAsNonRoot: true
555+
seccompProfile:
556+
type: RuntimeDefault
551557
serviceAccountName: steadybit-extension-http
552558
volumes: null
553559
manifest should match snapshot with podSecurityContext:
@@ -628,12 +634,12 @@ manifest should match snapshot with podSecurityContext:
628634
drop:
629635
- ALL
630636
readOnlyRootFilesystem: true
631-
runAsGroup: 10000
632-
runAsNonRoot: true
633-
runAsUser: 10000
634637
volumeMounts: null
635638
securityContext:
639+
runAsNonRoot: true
636640
runAsUser: 2222
641+
seccompProfile:
642+
type: RuntimeDefault
637643
serviceAccountName: steadybit-extension-http
638644
volumes: null
639645
manifest should match snapshot with priority class:
@@ -714,11 +720,12 @@ manifest should match snapshot with priority class:
714720
drop:
715721
- ALL
716722
readOnlyRootFilesystem: true
717-
runAsGroup: 10000
718-
runAsNonRoot: true
719-
runAsUser: 10000
720723
volumeMounts: null
721724
priorityClassName: my-priority-class
725+
securityContext:
726+
runAsNonRoot: true
727+
seccompProfile:
728+
type: RuntimeDefault
722729
serviceAccountName: steadybit-extension-http
723730
volumes: null
724731
manifest should match snapshot without TLS:
@@ -799,10 +806,11 @@ manifest should match snapshot without TLS:
799806
drop:
800807
- ALL
801808
readOnlyRootFilesystem: true
802-
runAsGroup: 10000
803-
runAsNonRoot: true
804-
runAsUser: 10000
805809
volumeMounts: null
810+
securityContext:
811+
runAsNonRoot: true
812+
seccompProfile:
813+
type: RuntimeDefault
806814
serviceAccountName: steadybit-extension-http
807815
volumes: null
808816
should add cluster name from global values:
@@ -885,10 +893,11 @@ should add cluster name from global values:
885893
drop:
886894
- ALL
887895
readOnlyRootFilesystem: true
888-
runAsGroup: 10000
889-
runAsNonRoot: true
890-
runAsUser: 10000
891896
volumeMounts: null
897+
securityContext:
898+
runAsNonRoot: true
899+
seccompProfile:
900+
type: RuntimeDefault
892901
serviceAccountName: steadybit-extension-http
893902
volumes: null
894903
should add cluster name from local values:
@@ -971,10 +980,11 @@ should add cluster name from local values:
971980
drop:
972981
- ALL
973982
readOnlyRootFilesystem: true
974-
runAsGroup: 10000
975-
runAsNonRoot: true
976-
runAsUser: 10000
977983
volumeMounts: null
984+
securityContext:
985+
runAsNonRoot: true
986+
seccompProfile:
987+
type: RuntimeDefault
978988
serviceAccountName: steadybit-extension-http
979989
volumes: null
980990
should enable location selection:
@@ -1057,9 +1067,10 @@ should enable location selection:
10571067
drop:
10581068
- ALL
10591069
readOnlyRootFilesystem: true
1060-
runAsGroup: 10000
1061-
runAsNonRoot: true
1062-
runAsUser: 10000
10631070
volumeMounts: null
1071+
securityContext:
1072+
runAsNonRoot: true
1073+
seccompProfile:
1074+
type: RuntimeDefault
10641075
serviceAccountName: steadybit-extension-http
10651076
volumes: null

‎charts/steadybit-extension-http/values.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,18 @@ affinity: {}
107107
priorityClassName: null
108108

109109
# podSecurityContext -- SecurityContext to apply to the pod.
110-
podSecurityContext: {}
110+
podSecurityContext:
111+
seccompProfile:
112+
type: RuntimeDefault
113+
runAsNonRoot: true
114+
115+
# containerSecurityContext -- SecurityContext to apply to the container.
116+
containerSecurityContext:
117+
readOnlyRootFilesystem: true
118+
allowPrivilegeEscalation: false
119+
capabilities:
120+
drop:
121+
- ALL
111122

112123
# extraEnv -- Array with extra environment variables to add to the container
113124
# e.g:

0 commit comments

Comments
 (0)
Please sign in to comment.