@@ -131,6 +131,11 @@ spec:
131131 labels :
132132 app : volcano-admission
133133 spec :
134+ securityContext :
135+ seLinuxOptions :
136+ level : s0:c123,c456
137+ seccompProfile :
138+ type : RuntimeDefault
134139 serviceAccount : volcano-admission
135140 priorityClassName : system-cluster-critical
136141 containers :
@@ -156,6 +161,15 @@ spec:
156161 readOnly : true
157162 - mountPath : /admission.local.config/configmap
158163 name : admission-config
164+ securityContext :
165+ allowPrivilegeEscalation : false
166+ capabilities :
167+ add :
168+ - DAC_OVERRIDE
169+ drop :
170+ - ALL
171+ runAsNonRoot : true
172+ runAsUser : 1000
159173 volumes :
160174 - name : admission-certs
161175 secret :
@@ -226,6 +240,11 @@ spec:
226240 backoffLimit : 3
227241 template :
228242 spec :
243+ securityContext :
244+ seLinuxOptions :
245+ level : s0:c123,c456
246+ seccompProfile :
247+ type : RuntimeDefault
229248 serviceAccountName : volcano-admission-init
230249 priorityClassName : system-cluster-critical
231250 restartPolicy : Never
@@ -235,6 +254,15 @@ spec:
235254 imagePullPolicy : Always
236255 command : ["./gen-admission-secret.sh", "--service", "volcano-admission-service", "--namespace",
237256 " volcano-system" , "--secret", "volcano-admission-secret"]
257+ securityContext :
258+ allowPrivilegeEscalation : false
259+ capabilities :
260+ add :
261+ - DAC_OVERRIDE
262+ drop :
263+ - ALL
264+ runAsNonRoot : true
265+ runAsUser : 1000
238266---
239267# Source: volcano/templates/batch_v1alpha1_job.yaml
240268apiVersion : apiextensions.k8s.io/v1
@@ -4465,6 +4493,11 @@ spec:
44654493 labels :
44664494 app : volcano-controller
44674495 spec :
4496+ securityContext :
4497+ seLinuxOptions :
4498+ level : s0:c123,c456
4499+ seccompProfile :
4500+ type : RuntimeDefault
44684501 serviceAccount : volcano-controllers
44694502 priorityClassName : system-cluster-critical
44704503 containers :
@@ -4483,6 +4516,15 @@ spec:
44834516 - -v=4
44844517 - 2>&1
44854518 imagePullPolicy : Always
4519+ securityContext :
4520+ allowPrivilegeEscalation : false
4521+ capabilities :
4522+ add :
4523+ - DAC_OVERRIDE
4524+ drop :
4525+ - ALL
4526+ runAsNonRoot : true
4527+ runAsUser : 1000
44864528---
44874529# Source: volcano/templates/scheduler.yaml
44884530apiVersion : v1
@@ -4645,6 +4687,11 @@ spec:
46454687 labels :
46464688 app : volcano-scheduler
46474689 spec :
4690+ securityContext :
4691+ seLinuxOptions :
4692+ level : s0:c123,c456
4693+ seccompProfile :
4694+ type : RuntimeDefault
46484695 serviceAccount : volcano-scheduler
46494696 priorityClassName : system-cluster-critical
46504697 containers :
@@ -4671,6 +4718,15 @@ spec:
46714718 mountPath : /volcano.scheduler
46724719 - name : klog-sock
46734720 mountPath : /tmp/klog-socks
4721+ securityContext :
4722+ allowPrivilegeEscalation : false
4723+ capabilities :
4724+ add :
4725+ - DAC_OVERRIDE
4726+ drop :
4727+ - ALL
4728+ runAsNonRoot : true
4729+ runAsUser : 1000
46744730 volumes :
46754731 - name : scheduler-config
46764732 configMap :
0 commit comments