You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates to pgcluster annotations for current primary status and
podAntiAffinity key update.
Previously, the 'current primary' name of a particular Postgres
cluster managed by the Postgres Operator has been stored in various
locations and, depending on version, updated inconsistently. This can
result in a lack of clarity as to which pod is currently acting in
the Primary/Master role should the cluster be upgraded in the future.
Beyond the obvious confusion this may cause, it is essential for the
upcoming pgcluster upgrade process to properly identify the correct
primary pod after a failover, restore or similar event.
This update seeks to improve upon the current identification
method. For example, after a failover, pgcluster
'mycluster'
may have a primary pod, deployment and PVC named
'mycluster-abcd'
Should this pgcluster be recreated, as happens with the upcoming upgrade
procedure we would want to ensure the correct PVC is utilized. To
facilitate this, a new annotation 'current-primary' has been added to the
pgcluster CRD. This value will be updated, along with the 'deployment-name'
label, 'primary-deployment' annotation and 'PrimaryStorage' name in the
relevant CRD during a failover or cluster restore. This will allow for a
recreated cluster to point to a PVC of previous replica that was promoted
to be the current primary pod.
Should this pgcluster be recreated, as happens with the upcoming upgrade
procedure we would want to ensure the correct PVC is utilized.
The pgcluster Spec is also updated to refer to a json value key of
"podAntiAffinity" instead of "podPodAntiAffinity" which both corrects
a confusing naming convention, but reflects the underlying type change
between this and previous Operator versions.
0 commit comments