Skip to content

Commit

Permalink
Default to use pod security context
Browse files Browse the repository at this point in the history
  • Loading branch information
allanrogerr committed Dec 19, 2022
1 parent c420b91 commit 0bd5ab7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/resources/statefulsets/minio-statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ func poolContainerSecurityContext(pool *miniov2.Pool) *v1.SecurityContext {
runAsNonRoot := true
var runAsUser int64 = 1000
var runAsGroup int64 = 1000
// Default to Pod values
if pool.SecurityContext != nil {
runAsNonRoot = *pool.SecurityContext.RunAsNonRoot
runAsUser = *pool.SecurityContext.RunAsUser
runAsGroup = *pool.SecurityContext.RunAsGroup
}

securityContext := corev1.SecurityContext{
RunAsNonRoot: &runAsNonRoot,
Expand Down

0 comments on commit 0bd5ab7

Please sign in to comment.