Skip to content

Commit e180993

Browse files
jkatzJonathan S. Katz
authored andcommitted
Ensure superfluous label is removed from user labels on upgrade
This removes the "pg-pod-anti-affinity" label from the "userlabels" section of the pgclusters custom resource during the upgrade process. This has long been managed through the custom resource itself and should not be present within the custom labels. Issue: [ch11573]
1 parent bb48a9a commit e180993

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/operator/cluster/upgrade.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ func preparePgclusterForUpgrade(pgcluster *crv1.Pgcluster, parameters map[string
541541
}
542542
delete(pgcluster.Spec.UserLabels, "service-type")
543543

544+
// 4.6.0 removed the "pg-pod-anti-affinity" label from user labels, as this is
545+
// superfluous and handled through other processes. We can explicitly
546+
// eliminate it
547+
delete(pgcluster.Spec.UserLabels, "pg-pod-anti-affinity")
548+
544549
// 4.6.0 moved the "autofail" label to the DisableAutofail attribute. Given
545550
// by default we need to start in an autofailover state, we just delete the
546551
// legacy attribute

0 commit comments

Comments
 (0)