Skip to content

Commit 0ab9893

Browse files
authored
fix(sync): add security context with SYS_ADMIN and SYS_CHROOT capabilities (#97)
Signed-off-by: Xuhui zhang <[email protected]>
1 parent 4116b0a commit 0ab9893

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/builder/sync_pod.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ done
174174
Image: s.sc.Spec.Image,
175175
ImagePullPolicy: s.sc.Spec.ImagePullPolicy,
176176
Resources: s.getWorkerResources(),
177+
SecurityContext: &corev1.SecurityContext{
178+
Capabilities: &corev1.Capabilities{
179+
Add: []corev1.Capability{"SYS_ADMIN", "SYS_CHROOT"},
180+
},
181+
},
177182
Command: []string{
178183
"sh",
179184
"-c",

0 commit comments

Comments
 (0)