Skip to content

Commit

Permalink
Remove useless check
Browse files Browse the repository at this point in the history
  • Loading branch information
eberlep committed Sep 16, 2024
1 parent f3eb35e commit 1e5586e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/webhooks/fsGroupChangePolicySetter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (a *FsGroupChangePolicySetter) Handle(ctx context.Context, req admission.Re
}

// when the fsGroup field is set, also set the fsGroupChangePolicy to OnRootMismatch
if sts != nil && sts.Spec.Template.Spec.SecurityContext != nil && sts.Spec.Template.Spec.SecurityContext.FSGroup != nil {
if sts.Spec.Template.Spec.SecurityContext != nil && sts.Spec.Template.Spec.SecurityContext.FSGroup != nil {
p := v1.FSGroupChangeOnRootMismatch
sts.Spec.Template.Spec.SecurityContext.FSGroupChangePolicy = &p
log.V(1).Info("Mutating StatefulSet", "sts", sts)
Expand Down

0 comments on commit 1e5586e

Please sign in to comment.