Skip to content

Commit

Permalink
fix privileged in initContainer
Browse files Browse the repository at this point in the history
Signed-off-by: zwwhdls <[email protected]>
  • Loading branch information
zwwhdls committed Sep 18, 2023
1 parent 6266d84 commit 41c8c1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/juicefs/mount/builder/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,14 @@ func (r *PodBuilder) genHostPathVolumes() (volumes []corev1.Volume, volumeMounts
// genInitContainer: generate init container
func (r *PodBuilder) genInitContainer() corev1.Container {
rootUser := int64(0)
isPrivileged := true
secretName := r.jfsSetting.SecretName
container := corev1.Container{
Name: "jfs-format",
Image: r.jfsSetting.Attr.Image,
SecurityContext: &corev1.SecurityContext{
RunAsUser: &rootUser,
Privileged: &isPrivileged,
RunAsUser: &rootUser,
},
}

Expand Down

0 comments on commit 41c8c1b

Please sign in to comment.