mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-02 14:23:54 +00:00
Add --ipvs-exclude-cidrs flag to kube-proxy.
This commit is contained in:
@@ -116,6 +116,7 @@ func validateKubeProxyIPVSConfiguration(config kubeproxyconfig.KubeProxyIPVSConf
|
||||
}
|
||||
|
||||
allErrs = append(allErrs, validateIPVSSchedulerMethod(kubeproxyconfig.IPVSSchedulerMethod(config.Scheduler), fldPath.Child("Scheduler"))...)
|
||||
allErrs = append(allErrs, validateIPVSExcludeCIDRs(config.ExcludeCIDRs, fldPath.Child("ExcludeCidrs"))...)
|
||||
|
||||
return allErrs
|
||||
}
|
||||
@@ -253,3 +254,14 @@ func validateKubeProxyNodePortAddress(nodePortAddresses []string, fldPath *field
|
||||
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func validateIPVSExcludeCIDRs(excludeCIDRs []string, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
|
||||
for i := range excludeCIDRs {
|
||||
if _, _, err := net.ParseCIDR(excludeCIDRs[i]); err != nil {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath, excludeCIDRs, "must be a valid IP block"))
|
||||
}
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user