Skip to content

Commit

Permalink
Merge pull request #555 from JoelSpeed/exclude-cloud-fg
Browse files Browse the repository at this point in the history
Bug 1989073: Exclude openshift only CloudProvider feature gate from KCM config
  • Loading branch information
openshift-ci[bot] committed Aug 2, 2021
2 parents 38b0aaf + 24cb98d commit 9e0bdb0
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package configobservercontroller

import (
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/client-go/tools/cache"

configinformers "github.com/openshift/client-go/config/informers/externalversions"
libgocloudprovider "github.com/openshift/library-go/pkg/cloudprovider"
"github.com/openshift/library-go/pkg/controller/factory"
"github.com/openshift/library-go/pkg/operator/configobserver"
libgoapiserver "github.com/openshift/library-go/pkg/operator/configobserver/apiserver"
Expand All @@ -22,6 +24,14 @@ import (
"github.com/openshift/cluster-kube-controller-manager-operator/pkg/operator/operatorclient"
)

// openShiftOnlyFeatureGates are feature gate names that are only used within
// OpenShift. Passing these to KCM causes it to log an error on startup.
// This list is passed to the feature gate config observer as a blacklist,
// excluding them from the feature gate output passed to KCM.
var openShiftOnlyFeatureGates = sets.NewString(
libgocloudprovider.ExternalCloudProviderFeature,
)

type ConfigObserver struct {
factory.Controller
}
Expand Down Expand Up @@ -88,7 +98,7 @@ func NewConfigObserver(
[]string{"extendedArguments", "cloud-config"}),
featuregates.NewObserveFeatureFlagsFunc(
nil,
nil,
openShiftOnlyFeatureGates,
[]string{"extendedArguments", "feature-gates"},
),
network.ObserveClusterCIDRs,
Expand Down

0 comments on commit 9e0bdb0

Please sign in to comment.