Skip to content

Commit 64544e5

Browse files
authored
Merge pull request #116 from cybertec-postgresql/serviceNameSynxfix
ensure a recreate of sts is trggered if there is a serviceName change
2 parents 4bf1c83 + 4767bcf commit 64544e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cluster/cluster.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,11 @@ func (c *Cluster) compareStatefulSetWith(oldSts, newSts *appsv1.StatefulSet) *co
566566
needsRollUpdate = true
567567
reasons = append(reasons, "new statefulset's serviceAccountName service account name does not match the current one")
568568
}
569+
if oldSts.Spec.ServiceName != newSts.Spec.ServiceName {
570+
needsReplace = true
571+
needsRollUpdate = true
572+
reasons = append(reasons, "new statefulset's serviceName does not match the current one")
573+
}
569574
if *oldSts.Spec.Template.Spec.TerminationGracePeriodSeconds != *newSts.Spec.Template.Spec.TerminationGracePeriodSeconds {
570575
needsReplace = true
571576
needsRollUpdate = true

0 commit comments

Comments
 (0)