block automatic major version upgrade with annotation for single cluster

This commit is contained in:
Felix Kunde
2024-07-03 17:27:00 +02:00
parent 37d6993439
commit af2d0f7d92
11 changed files with 30 additions and 0 deletions
+7
View File
@@ -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 {