mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-07 04:12:56 +02:00
block automatic major version upgrade with annotation for single cluster
This commit is contained in:
@@ -67,6 +67,13 @@ func (c *Cluster) majorVersionUpgrade() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
ignoreAutoVersionUpgradeKey := c.OpConfig.IgnoreAutoVersionUpgradeKey
|
||||
if ignoreAutoVersionUpgradeKey != "" {
|
||||
if value, exists := c.ObjectMeta.Annotations[ignoreAutoVersionUpgradeKey]; exists && value == "true" {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
desiredVersion := c.GetDesiredMajorVersionAsInt()
|
||||
|
||||
if c.currentMajorVersion >= desiredVersion {
|
||||
|
||||
Reference in New Issue
Block a user