add kube config file of kube-proxy to kube-proxy config map

pull/6/head
Lion-Wei 2017-11-24 16:58:04 +08:00
parent 45db5e7260
commit 92117f69e3
1 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,8 @@ const (
DefaultProxyBindAddressv4 = "0.0.0.0"
// DefaultProxyBindAddressv6 is the default bind address when the advertise address is v6
DefaultProxyBindAddressv6 = "::"
// KubeproxyKubeConfigFileName efines the file name for the kube-proxy's KubeConfig file
KubeproxyKubeConfigFileName = "/var/lib/kube-proxy/kubeconfig.conf"
)
func addDefaultingFuncs(scheme *runtime.Scheme) error {
@ -127,6 +129,10 @@ func SetDefaults_ProxyConfiguration(obj *MasterConfiguration) {
obj.KubeProxy.Config.ClusterCIDR = obj.Networking.PodSubnet
}
if obj.KubeProxy.Config.ClientConnection.KubeConfigFile == "" {
obj.KubeProxy.Config.ClientConnection.KubeConfigFile = KubeproxyKubeConfigFileName
}
kubeproxyscheme.Scheme.Default(obj.KubeProxy.Config)
}