Revert "proxy startup-time config handling cleanup"
This commit is contained in:
@@ -95,8 +95,6 @@ func Validate(config *kubeproxyconfig.KubeProxyConfiguration) field.ErrorList {
|
||||
|
||||
allErrs = append(allErrs, validateKubeProxyNodePortAddress(config.NodePortAddresses, newPath.Child("NodePortAddresses"))...)
|
||||
allErrs = append(allErrs, validateShowHiddenMetricsVersion(config.ShowHiddenMetricsForVersion, newPath.Child("ShowHiddenMetricsForVersion"))...)
|
||||
|
||||
allErrs = append(allErrs, validateDetectLocalMode(config.DetectLocalMode, newPath.Child("DetectLocalMode"))...)
|
||||
if config.DetectLocalMode == kubeproxyconfig.LocalModeBridgeInterface {
|
||||
allErrs = append(allErrs, validateInterface(config.DetectLocal.BridgeInterface, newPath.Child("InterfaceName"))...)
|
||||
}
|
||||
@@ -207,22 +205,6 @@ func validateProxyModeWindows(mode kubeproxyconfig.ProxyMode, fldPath *field.Pat
|
||||
return field.ErrorList{field.Invalid(fldPath.Child("ProxyMode"), string(mode), errMsg)}
|
||||
}
|
||||
|
||||
func validateDetectLocalMode(mode kubeproxyconfig.LocalMode, fldPath *field.Path) field.ErrorList {
|
||||
validModes := []string{
|
||||
string(kubeproxyconfig.LocalModeClusterCIDR),
|
||||
string(kubeproxyconfig.LocalModeNodeCIDR),
|
||||
string(kubeproxyconfig.LocalModeBridgeInterface),
|
||||
string(kubeproxyconfig.LocalModeInterfaceNamePrefix),
|
||||
"",
|
||||
}
|
||||
|
||||
if sets.New(validModes...).Has(string(mode)) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return field.ErrorList{field.NotSupported(fldPath, string(mode), validModes)}
|
||||
}
|
||||
|
||||
func validateClientConnectionConfiguration(config componentbaseconfig.ClientConnectionConfiguration, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(config.Burst), fldPath.Child("Burst"))...)
|
||||
|
Reference in New Issue
Block a user