Skip to content

Commit 58ff1b7

Browse files
feat: Add security contexts to controller managers (#2759)
* Add security contexts to controller managers Signed-off-by: kunal-511 <yoyokvunal@gmail.com> * Fix indentation Signed-off-by: kunal-511 <yoyokvunal@gmail.com> * Update label Signed-off-by: kunal-511 <yoyokvunal@gmail.com> * Update manager.yaml Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Update jobset_security_context.yaml Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Updated helm charts for the jobset security context Signed-off-by: kunal-511 <yoyokvunal@gmail.com> * Removed already there in upstream Signed-off-by: kunal-511 <yoyokvunal@gmail.com> * add security context to helm charts Signed-off-by: kunal-511 <yoyokvunal@gmail.com> --------- Signed-off-by: kunal-511 <yoyokvunal@gmail.com> Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Co-authored-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com>
1 parent 9011ad7 commit 58ff1b7

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

charts/kubeflow-trainer/values.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,14 @@ manager:
9292
# memory: 300Mi
9393

9494
# -- Security context for manager containers.
95-
securityContext: {}
96-
# readOnlyRootFilesystem: true
97-
# privileged: false
98-
# allowPrivilegeEscalation: false
99-
# runAsNonRoot: true
100-
# capabilities:
101-
# drop:
102-
# - ALL
103-
# seccompProfile:
104-
# type: RuntimeDefault
95+
securityContext:
96+
allowPrivilegeEscalation: false
97+
runAsNonRoot: true
98+
capabilities:
99+
drop:
100+
- ALL
101+
seccompProfile:
102+
type: RuntimeDefault
105103

106104
webhook:
107105
# -- Specifies how unrecognized errors are handled.

manifests/base/manager/manager.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ spec:
2323
containers:
2424
- name: manager
2525
image: ghcr.io/kubeflow/trainer/trainer-controller-manager
26+
securityContext:
27+
allowPrivilegeEscalation: false
28+
runAsNonRoot: true
29+
capabilities:
30+
drop:
31+
- ALL
32+
seccompProfile:
33+
type: RuntimeDefault
2634
volumeMounts:
2735
- mountPath: /tmp/k8s-webhook-server/serving-certs
2836
name: cert

0 commit comments

Comments
 (0)