mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #56330 from Lion-Wei/kubeadm
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. add kube config file of kube-proxy to kube-proxy config map **What this PR does / why we need it**: fix kube-proxy config bug in kubeadm build cluster **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes kubernetes/kubeadm#570 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
e7ad6e6008
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user