-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathfeatures.go
More file actions
30 lines (23 loc) · 1.07 KB
/
features.go
File metadata and controls
30 lines (23 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package features
import (
"github.com/go-logr/logr"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/component-base/featuregate"
featuregatesutil "github.com/operator-framework/operator-controller/internal/shared/util/featuregates"
)
const (
APIV1MetasHandler = featuregate.Feature("APIV1MetasHandler")
GraphQLCatalogQueries = featuregate.Feature("GraphQLCatalogQueries")
)
var catalogdFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
APIV1MetasHandler: {Default: false, PreRelease: featuregate.Alpha, LockToDefault: false},
GraphQLCatalogQueries: {Default: false, PreRelease: featuregate.Alpha, LockToDefault: false},
}
var CatalogdFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()
func init() {
utilruntime.Must(CatalogdFeatureGate.Add(catalogdFeatureGates))
}
// LogFeatureGateStates logs the state of all known feature gates for catalogd
func LogFeatureGateStates(log logr.Logger, fg featuregate.FeatureGate) {
featuregatesutil.LogFeatureGateStates(log, "catalogd feature gate status", fg, catalogdFeatureGates)
}