Skip to content

Commit 3513068

Browse files
author
Per Goncalves da Silva
committed
Add featuregate
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent fa464c3 commit 3513068

File tree

1 file changed

+31
-22
lines changed

1 file changed

+31
-22
lines changed
Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
11
package features
22

33
import (
4-
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
5-
"k8s.io/component-base/featuregate"
4+
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
5+
"k8s.io/component-base/featuregate"
66
)
77

88
const (
9-
// Add new feature gates constants (strings)
10-
// Ex: SomeFeature featuregate.Feature = "SomeFeature"
11-
PreflightPermissions featuregate.Feature = "PreflightPermissions"
12-
SingleOwnNamespaceInstallSupport featuregate.Feature = "SingleOwnNamespaceInstallSupport"
9+
// Add new feature gates constants (strings)
10+
// Ex: SomeFeature featuregate.Feature = "SomeFeature"
11+
PreflightPermissions featuregate.Feature = "PreflightPermissions"
12+
SingleOwnNamespaceInstallSupport featuregate.Feature = "SingleOwnNamespaceInstallSupport"
13+
SyntheticPermissions featuregate.Feature = "SyntheticPermissions"
1314
)
1415

1516
var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
16-
// Add new feature gate definitions
17-
// Ex: SomeFeature: {...}
18-
PreflightPermissions: {
19-
Default: false,
20-
PreRelease: featuregate.Alpha,
21-
LockToDefault: false,
22-
},
17+
// Add new feature gate definitions
18+
// Ex: SomeFeature: {...}
19+
PreflightPermissions: {
20+
Default: false,
21+
PreRelease: featuregate.Alpha,
22+
LockToDefault: false,
23+
},
2324

24-
// SingleOwnNamespaceInstallSupport enables support for installing
25-
// registry+v1 cluster extensions with single or own namespaces modes
26-
// i.e. with a single watch namespace.
27-
SingleOwnNamespaceInstallSupport: {
28-
Default: false,
29-
PreRelease: featuregate.Alpha,
30-
LockToDefault: false,
31-
},
25+
// SingleOwnNamespaceInstallSupport enables support for installing
26+
// registry+v1 cluster extensions with single or own namespaces modes
27+
// i.e. with a single watch namespace.
28+
SingleOwnNamespaceInstallSupport: {
29+
Default: false,
30+
PreRelease: featuregate.Alpha,
31+
LockToDefault: false,
32+
},
33+
34+
// SyntheticPermissions enables support for a synthetic user permission
35+
// model to manage operator permission boundaries
36+
SyntheticPermissions: {
37+
Default: false,
38+
PreRelease: featuregate.Alpha,
39+
LockToDefault: false,
40+
},
3241
}
3342

3443
var OperatorControllerFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()
3544

3645
func init() {
37-
utilruntime.Must(OperatorControllerFeatureGate.Add(operatorControllerFeatureGates))
46+
utilruntime.Must(OperatorControllerFeatureGate.Add(operatorControllerFeatureGates))
3847
}

0 commit comments

Comments
 (0)