Skip to content

Commit aa06bcc

Browse files
committed
chore(k8s): add privileged to dind
1 parent 35ad9a1 commit aa06bcc

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

pkg/gitreceive/k8s_util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ func buildPod(
165165
Containers: []corev1.Container{
166166
{
167167
ImagePullPolicy: pullPolicy,
168+
SecurityContext: k8s.SecurityContextFromPrivileged(true),
168169
},
169170
},
170171
Volumes: []corev1.Volume{},
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ func PullPolicyFromString(ppStr string) (v1.PullPolicy, error) {
3333
}
3434
return candidatePP, nil
3535
}
36+
37+
// SecurityContextFromPrivileged create api.SecurityContext by privileged.
38+
func SecurityContextFromPrivileged(privileged bool) *v1.SecurityContext {
39+
return &v1.SecurityContext{
40+
Privileged: &privileged,
41+
}
42+
}

0 commit comments

Comments
 (0)