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
Copy file name to clipboardExpand all lines: docs/administrator.md
+6
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,12 @@ It is also possible to define `maintenanceWindows` in the Postgres manifest to
85
85
better control when such automated upgrades should take place after increasing
86
86
the version.
87
87
88
+
### Upgrade annotations
89
+
90
+
When an upgrade is executed, the operator sets an annotation in the PostgreSQL resource, either `last-major-upgrade-success` if the upgrade succeeds, or `last-major-upgrade-failure` if it fails. The value of the annotation is a timestamp indicating when the upgrade occurred.
91
+
92
+
If a PostgreSQL resource contains a failure annotation, the operator will not attempt to retry the upgrade during a sync event. To remove the failure annotation, you can revert the PostgreSQL version back to the current version. This action will trigger the removal of the failure annotation.
93
+
88
94
## Non-default cluster domain
89
95
90
96
If your cluster uses a DNS domain other than the default `cluster.local`, this
self.eventuallyEqual(check_version, 15, "Version should be upgraded from 13 to 15")
1284
+
1285
+
# check if annotation for last upgrade's success is updated after second upgrade
1286
+
third_annotations=get_annotations()
1287
+
self.assertIsNotNone(third_annotations.get("last-major-upgrade-success"), "Annotation for last upgrade's success is not set")
1288
+
self.assertNotEqual(annotations.get("last-major-upgrade-success"), third_annotations.get("last-major-upgrade-success"), "Annotation for last upgrade's success is not updated")
c.eventRecorder.Eventf(c.GetReference(), v1.EventTypeWarning, "Major Version Upgrade", "upgrade from %d to %d FAILED: %v", c.currentMajorVersion, desiredVersion, err)
136
198
returnerr
137
199
}
138
-
c.logger.Infof("upgrade action triggered and command completed: %s", result[:100])
139
200
201
+
c.annotatePostgresResource(isUpgradeSuccess)
202
+
c.logger.Infof("upgrade action triggered and command completed: %s", result[:100])
140
203
c.eventRecorder.Eventf(c.GetReference(), v1.EventTypeNormal, "Major Version Upgrade", "upgrade from %d to %d finished", c.currentMajorVersion, desiredVersion)
0 commit comments