Skip to content

Commit

Permalink
Merge pull request #640 from luthermonson/win-ipv6-disable
Browse files Browse the repository at this point in the history
disable ipv6 in windows kube-proxy
  • Loading branch information
luthermonson authored Aug 9, 2021
2 parents 14742c2 + 88a86a6 commit 065ad56
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -9161,7 +9161,7 @@
},
"kubeproxy": {
"enable-dsr": "false",
"feature-gates": "WinOverlay=true",
"feature-gates": "IPv6DualStack=false",
"healthz-bind-address": "127.0.0.1",
"proxy-mode": "kernelspace",
"v": "2"
Expand Down
15 changes: 14 additions & 1 deletion rke/k8s_windows_service_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ func loadK8sVersionWindowsServiceOptions() map[string]v3.KubernetesServicesOptio
return map[string]v3.KubernetesServicesOptions{
"v1.21": {
Kubelet: getWindowsKubeletOptions121(),
Kubeproxy: getWindowsKubeProxyOptions(),
Kubeproxy: getWindowsKubeProxyOptions121(),
},
"v1.20": {
Kubelet: getWindowsKubeletOptions116(),
Expand Down Expand Up @@ -89,6 +89,19 @@ func getWindowsKubeletOptions121() map[string]string {
return kubeletOptions
}

func getWindowsKubeProxyOptions121() map[string]string {
kubeProxyOptions := getKubeProxyOptions()

// use kernelspace proxy mode
kubeProxyOptions["proxy-mode"] = "kernelspace"
// disable Windows IPv6DualStack support, WinOverlay already defaults to true
kubeProxyOptions["feature-gates"] = "IPv6DualStack=false"
// disable Windows DSR support explicitly
kubeProxyOptions["enable-dsr"] = "false"

return kubeProxyOptions
}

func getWindowsKubeProxyOptions() map[string]string {
kubeProxyOptions := getKubeProxyOptions()

Expand Down

0 comments on commit 065ad56

Please sign in to comment.