mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Merge pull request #121301 from sttts/sttts-validate-cloud-provider-2
kubeapiserver/options: fix cloud provider validation
This commit is contained in:
commit
b7e5cbf1cf
@ -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', "+
|
||||
|
Loading…
Reference in New Issue
Block a user