mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #90127 from needkane/pr
[cmd/kube-apiserver] "return []error{} -> return nil" and "update annotation"
This commit is contained in:
commit
250884c9c1
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user