@@ -496,11 +496,11 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *appsv1.StatefulSet) *compa
496
496
needsRollUpdate = true
497
497
reasons = append (reasons , "new statefulset's pod template metadata annotations does not match " + reason )
498
498
}
499
- if ! reflect .DeepEqual (c .Statefulset .Spec .Template .Spec .SecurityContext , statefulSet .Spec .Template .Spec .SecurityContext ) {
500
- needsReplace = true
501
- needsRollUpdate = true
502
- reasons = append (reasons , "new statefulset's pod template security context in spec does not match the current one" )
503
- }
499
+ // if !reflect.DeepEqual(c.Statefulset.Spec.Template.Spec.SecurityContext, statefulSet.Spec.Template.Spec.SecurityContext) {
500
+ // needsReplace = true
501
+ // needsRollUpdate = true
502
+ // reasons = append(reasons, "new statefulset's pod template security context in spec does not match the current one")
503
+ // }
504
504
if len (c .Statefulset .Spec .VolumeClaimTemplates ) != len (statefulSet .Spec .VolumeClaimTemplates ) {
505
505
needsReplace = true
506
506
reasons = append (reasons , "new statefulset's volumeClaimTemplates contains different number of volumes to the old one" )
@@ -588,8 +588,8 @@ func (c *Cluster) compareContainers(description string, setA, setB []v1.Containe
588
588
func (a , b v1.Container ) bool { return ! compareEnv (a .Env , b .Env ) }),
589
589
newCheck ("new %s's %s (index %d) environment sources do not match the current one" ,
590
590
func (a , b v1.Container ) bool { return ! reflect .DeepEqual (a .EnvFrom , b .EnvFrom ) }),
591
- newCheck ("new %s's %s (index %d) security context does not match the current one" ,
592
- func (a , b v1.Container ) bool { return ! reflect .DeepEqual (a .SecurityContext , b .SecurityContext ) }),
591
+ // newCheck("new %s's %s (index %d) security context does not match the current one",
592
+ // func(a, b v1.Container) bool { return !reflect.DeepEqual(a.SecurityContext, b.SecurityContext) }),
593
593
newCheck ("new %s's %s (index %d) volume mounts do not match the current one" ,
594
594
func (a , b v1.Container ) bool { return ! reflect .DeepEqual (a .VolumeMounts , b .VolumeMounts ) }),
595
595
}
0 commit comments