mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
componentconfig: move kube proxy defaulting into the exetrnal api
This commit is contained in:
@@ -22,8 +22,8 @@ import (
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
||||
"k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1"
|
||||
"k8s.io/kubernetes/pkg/kubelet/qos"
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
|
||||
@@ -48,21 +48,13 @@ type ProxyServerConfig struct {
|
||||
}
|
||||
|
||||
func NewProxyConfig() *ProxyServerConfig {
|
||||
config := componentconfig.KubeProxyConfiguration{}
|
||||
api.Scheme.Convert(&v1alpha1.KubeProxyConfiguration{}, &config)
|
||||
return &ProxyServerConfig{
|
||||
KubeProxyConfiguration: componentconfig.KubeProxyConfiguration{
|
||||
BindAddress: "0.0.0.0",
|
||||
HealthzPort: 10249,
|
||||
HealthzBindAddress: "127.0.0.1",
|
||||
OOMScoreAdj: util.IntPtr(qos.KubeProxyOOMScoreAdj),
|
||||
ResourceContainer: "/kube-proxy",
|
||||
IPTablesSyncPeriod: unversioned.Duration{30 * time.Second},
|
||||
UDPIdleTimeout: unversioned.Duration{250 * time.Millisecond},
|
||||
ConntrackMax: 256 * 1024, // 4x default (64k)
|
||||
ConntrackTCPEstablishedTimeout: unversioned.Duration{Duration: 24 * time.Hour}, // 1 day (1/5 default)
|
||||
},
|
||||
KubeAPIQPS: 5.0,
|
||||
KubeAPIBurst: 10,
|
||||
ConfigSyncPeriod: 15 * time.Minute,
|
||||
KubeProxyConfiguration: config,
|
||||
KubeAPIQPS: 5.0,
|
||||
KubeAPIBurst: 10,
|
||||
ConfigSyncPeriod: 15 * time.Minute,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user