We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0727737 commit 40e2991Copy full SHA for 40e2991
pkg/cmd/init/exec.go
@@ -159,15 +159,9 @@ func (o *Options) validate() error {
159
}
160
161
162
- featureGates := genericclioptionsclusteradm.ConvertToFeatureGateAPI(
163
- genericclioptionsclusteradm.HubMutableFeatureGate, ocmfeature.DefaultHubRegistrationFeatureGates)
164
managedClusterAutoApprove := false
165
- for _, feature := range featureGates {
166
- if feature.Feature == "ManagedClusterAutoApproval" {
167
- if feature.Mode == "Enable" {
168
- managedClusterAutoApprove = true
169
- }
170
+ if genericclioptionsclusteradm.HubMutableFeatureGate.Enabled("ManagedClusterAutoApproval") {
+ managedClusterAutoApprove = true
171
172
173
if managedClusterAutoApprove {
0 commit comments