File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,12 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *appsv1.StatefulSet) *compa
455455 needsRollUpdate = true
456456 reasons = append (reasons , "new statefulset's pod template metadata annotations doesn't match the current one" )
457457 }
458+ if ! reflect .DeepEqual (c .Statefulset .Spec .Template .Spec .SecurityContext , statefulSet .Spec .Template .Spec .SecurityContext ) {
459+ match = false
460+ needsReplace = true
461+ needsRollUpdate = true
462+ reasons = append (reasons , "new statefulset's pod template security context in spec doesn't match the current one" )
463+ }
458464 if len (c .Statefulset .Spec .VolumeClaimTemplates ) != len (statefulSet .Spec .VolumeClaimTemplates ) {
459465 needsReplace = true
460466 reasons = append (reasons , "new statefulset's volumeClaimTemplates contains different number of volumes to the old one" )
You can’t perform that action at this time.
0 commit comments