|
1 | 1 | package features
|
2 | 2 |
|
3 | 3 | 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" |
6 | 6 | )
|
7 | 7 |
|
8 | 8 | 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" |
13 | 14 | )
|
14 | 15 |
|
15 | 16 | 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 | + }, |
23 | 24 |
|
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 | + }, |
32 | 41 | }
|
33 | 42 |
|
34 | 43 | var OperatorControllerFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()
|
35 | 44 |
|
36 | 45 | func init() {
|
37 |
| - utilruntime.Must(OperatorControllerFeatureGate.Add(operatorControllerFeatureGates)) |
| 46 | + utilruntime.Must(OperatorControllerFeatureGate.Add(operatorControllerFeatureGates)) |
38 | 47 | }
|
0 commit comments