add flag 'logging-format' to kube-proxy

This commit is contained in:
cyclinder
2023-07-06 22:30:45 +08:00
committed by cyclinder
parent c550c17f7f
commit 71ef0dafa7
18 changed files with 193 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ import (
"k8s.io/apimachinery/pkg/util/validation/field"
utilfeature "k8s.io/apiserver/pkg/util/feature"
componentbaseconfig "k8s.io/component-base/config"
logsapi "k8s.io/component-base/logs/api/v1"
"k8s.io/component-base/metrics"
apivalidation "k8s.io/kubernetes/pkg/apis/core/validation"
kubeproxyconfig "k8s.io/kubernetes/pkg/proxy/apis/config"
@@ -103,6 +104,7 @@ func Validate(config *kubeproxyconfig.KubeProxyConfiguration) field.ErrorList {
if config.DetectLocalMode == kubeproxyconfig.LocalModeInterfaceNamePrefix {
allErrs = append(allErrs, validateInterface(config.DetectLocal.InterfaceNamePrefix, newPath.Child("InterfacePrefix"))...)
}
allErrs = append(allErrs, logsapi.Validate(&config.Logging, effectiveFeatures, newPath.Child("logging"))...)
return allErrs
}