Merge pull request #90127 from needkane/pr

[cmd/kube-apiserver]  "return []error{} -> return nil" and "update annotation"
This commit is contained in:
Kubernetes Prow Robot 2020-04-14 07:44:12 -07:00 committed by GitHub
commit 250884c9c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ func validateClusterIPFlags(options *ServerRunOptions) []error {
errs = append(errs, errors.New("--service-cluster-ip-range and --secondary-service-cluster-ip-range must be of different IP family")) errs = append(errs, errors.New("--service-cluster-ip-range and --secondary-service-cluster-ip-range must be of different IP family"))
} }
// should be smallish sized cidr, this thing is kept in etcd // Should be smallish sized cidr, this thing is kept in etcd
// bigger cidr (specially those offered by IPv6) will add no value // bigger cidr (specially those offered by IPv6) will add no value
// significantly increase snapshotting time. // significantly increase snapshotting time.
var ones, bits = options.SecondaryServiceClusterIPRange.Mask.Size() var ones, bits = options.SecondaryServiceClusterIPRange.Mask.Size()
@ -130,7 +130,7 @@ func validateTokenRequest(options *ServerRunOptions) []error {
func validateAPIPriorityAndFairness(options *ServerRunOptions) []error { func validateAPIPriorityAndFairness(options *ServerRunOptions) []error {
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && options.GenericServerRunOptions.EnablePriorityAndFairness { if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && options.GenericServerRunOptions.EnablePriorityAndFairness {
// we know we need the alpha API enabled. There are only a few ways to turn it on // We need the alpha API enabled. There are only a few ways to turn it on
enabledAPIString := options.APIEnablement.RuntimeConfig.String() enabledAPIString := options.APIEnablement.RuntimeConfig.String()
switch { switch {
case strings.Contains(enabledAPIString, "api/all=true"): case strings.Contains(enabledAPIString, "api/all=true"):
@ -144,7 +144,7 @@ func validateAPIPriorityAndFairness(options *ServerRunOptions) []error {
} }
} }
return []error{} return nil
} }
// Validate checks ServerRunOptions and return a slice of found errs. // Validate checks ServerRunOptions and return a slice of found errs.