Skip to content

Commit

Permalink
bugfix: set fsGroupChangePolicy to on root mismatch (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: Smuu <[email protected]>
  • Loading branch information
smuu authored Sep 22, 2023
1 parent 4615401 commit 9620d29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/k8s/k8s_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,10 @@ func preparePodSpec(spec PodConfig, init bool) (v1.PodSpec, error) {
var err error

// Prepare security context
podFSGroupChangePolicy := v1.FSGroupChangeOnRootMismatch
securityContext := v1.PodSecurityContext{
FSGroup: &spec.FsGroup,
FSGroup: &spec.FsGroup,
FSGroupChangePolicy: &podFSGroupChangePolicy,
}

// Prepare main container
Expand Down

0 comments on commit 9620d29

Please sign in to comment.