When nodeport is enabled, use strict kube-proxy-replacement to ensure cilium fully replaces kube-proxy

This commit is contained in:
Ole Markus With 2020-02-28 22:28:12 +01:00
parent 8ecc5edb73
commit e92e70c7d0
3 changed files with 3 additions and 2 deletions

View File

@ -453,7 +453,7 @@ func validateNetworkingCanal(v *kops.CanalNetworkingSpec, fldPath *field.Path) f
func validateNetworkingCilium(c *kops.ClusterSpec, v *kops.CiliumNetworkingSpec, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
if v.EnableNodePort && c.KubeProxy != nil && *c.KubeProxy.Enabled {
if v.EnableNodePort && c.KubeProxy != nil && (c.KubeProxy.Enabled == nil || *c.KubeProxy.Enabled) {
allErrs = append(allErrs, field.Forbidden(fldPath.Root().Child("spec", "kubeProxy", "enabled"), "When Cilium NodePort is enabled, kubeProxy must be disabled"))
}

View File

@ -121,6 +121,7 @@ data:
install-iptables-rules: "{{- if .IPTablesRulesNoinstall -}}false{{- else -}}true{{- end -}}"
auto-direct-node-routes: "{{- if .AutoDirectNodeRoutes -}}true{{- else -}}false{{- end -}}"
enable-node-port: "{{- if .EnableNodePort -}}true{{- else -}}false{{- end -}}"
kube-proxy-replacement: "{{- if .EnableNodePort -}}strict{{- else -}}disabled{{- end -}}"
{{ with .Ipam }}
ipam: {{ . }}
{{ if eq . "eni" }}

View File

@ -97,7 +97,7 @@ spec:
- id: k8s-1.12
kubernetesVersion: '>=1.12.0'
manifest: networking.cilium.io/k8s-1.12.yaml
manifestHash: 2d69106c5cd87e8be9f9d9f9d5216868689af22f
manifestHash: 77a1c4740beeaf403554fa4616809fa48fa07d78
name: networking.cilium.io
selector:
role.kubernetes.io/networking: "1"