Merge pull request #121301 from sttts/sttts-validate-cloud-provider-2

kubeapiserver/options: fix cloud provider validation
This commit is contained in:
Kubernetes Prow Robot 2023-10-26 01:08:14 +02:00 committed by GitHub
commit b7e5cbf1cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,10 +48,9 @@ func (opts *CloudProviderOptions) Validate() []error {
"please set DisableCloudProviders feature to true", opts.CloudProvider))
}
if !utilfeature.DefaultFeatureGate.Enabled(features.DisableKubeletCloudCredentialProviders) {
errs = append(errs, fmt.Errorf("when using --cloud-provider set to '%s', "+ //nolint:staticcheck,ineffassign // false positive
errs = append(errs, fmt.Errorf("when using --cloud-provider set to '%s', "+
"please set DisableKubeletCloudCredentialProviders feature to true", opts.CloudProvider))
}
return nil
case cloudprovider.IsDeprecatedInternal(opts.CloudProvider):
if utilfeature.DefaultFeatureGate.Enabled(features.DisableCloudProviders) {
errs = append(errs, fmt.Errorf("when using --cloud-provider set to '%s', "+