From b8f36268517dc39280fe964d131a6e3ff7ac9335 Mon Sep 17 00:00:00 2001 From: Mikalai Radchuk <509198+m1kola@users.noreply.github.com> Date: Fri, 6 Oct 2023 14:12:28 +0100 Subject: [PATCH] Add ForceSemverUpgradeConstraints feature gate (#438) Signed-off-by: Mikalai Radchuk --- config/default/manager_auth_proxy_patch.yaml | 1 + pkg/features/features.go | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index fc94aa59f..8cbe1fa77 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -50,3 +50,4 @@ spec: - "--health-probe-bind-address=:8081" - "--metrics-bind-address=127.0.0.1:8080" - "--leader-elect" + - "--feature-gates=ForceSemverUpgradeConstraints=true" diff --git a/pkg/features/features.go b/pkg/features/features.go index 399bc7356..329737a96 100644 --- a/pkg/features/features.go +++ b/pkg/features/features.go @@ -6,13 +6,17 @@ import ( ) const ( -// Add new feature gates constants (strings) -// Ex: SomeFeature featuregate.Feature = "SomeFeature" + // Add new feature gates constants (strings) + // Ex: SomeFeature featuregate.Feature = "SomeFeature" + + ForceSemverUpgradeConstraints featuregate.Feature = "ForceSemverUpgradeConstraints" ) var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ // Add new feature gate definitions // Ex: SomeFeature: {...} + + ForceSemverUpgradeConstraints: {Default: false, PreRelease: featuregate.Alpha}, } var OperatorControllerFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()