use cainjector feature flags

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2023-05-03 19:52:13 +02:00
parent 4d81f1877a
commit bce882b477
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D
2 changed files with 16 additions and 9 deletions

View File

@ -23,13 +23,18 @@ import (
)
const (
// FeatureName will enable XYZ feature.
// Fill this section out with additional details about the feature.
//
// Owner (responsible for graduating feature through to GA): @username
// Alpha: vX.Y
// Beta: ...
// FeatureName featuregate.Feature = "FeatureName"
// FeatureName will enable XYZ feature.
// Fill this section out with additional details about the feature.
//
// Owner (responsible for graduating feature through to GA): @username
// Alpha: vX.Y
// Beta: ...
// FeatureName featuregate.Feature = "FeatureName"
// alpha: v1.12.0
//
// ServerSideApply enables the use of ServerSideApply in all API calls.
ServerSideApply featuregate.Feature = "ServerSideApply"
)
func init() {
@ -43,4 +48,6 @@ func init() {
// utilfeature.DefaultFeatureGate.Enabled(feature.FeatureName)
//
// Where utilfeature is github.com/cert-manager/cert-manager/pkg/util/feature.
var cainjectorFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{}
var cainjectorFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
ServerSideApply: {Default: false, PreRelease: featuregate.Alpha},
}

View File

@ -31,7 +31,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/cert-manager/cert-manager/internal/controller/feature"
"github.com/cert-manager/cert-manager/internal/cainjector/feature"
certmanager "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
logf "github.com/cert-manager/cert-manager/pkg/logs"
utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature"