Skip to content

Commit

Permalink
Set podSecurityContext.fsGroup to 0 instead of 999
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunyiLyu committed Jan 11, 2022
1 parent 4488a4b commit da92f69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/resource/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ func (builder *StatefulSetBuilder) podTemplateSpec(previousPodAnnotations map[st
},
},
SecurityContext: &corev1.PodSecurityContext{
FSGroup: &rabbitmqUID,
FSGroup: pointer.Int64(0),
RunAsUser: &rabbitmqUID,
},
ImagePullSecrets: builder.Instance.Spec.ImagePullSecrets,
Expand Down
2 changes: 1 addition & 1 deletion internal/resource/statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ default_pass = {{ .Data.data.password }}
rmqUID := int64(999)

expectedPodSecurityContext := &corev1.PodSecurityContext{
FSGroup: &rmqUID,
FSGroup: pointer.Int64(0),
RunAsUser: &rmqUID,
}

Expand Down

0 comments on commit da92f69

Please sign in to comment.