diff --git a/pkg/asset/internal/templates.go b/pkg/asset/internal/templates.go old mode 100644 new mode 100755 index ed74c5339..3771b4f63 --- a/pkg/asset/internal/templates.go +++ b/pkg/asset/internal/templates.go @@ -1183,24 +1183,34 @@ data: # The CNI network configuration to install on each node. cni_network_config: |- { - "name": "k8s-pod-network", - "cniVersion": "0.3.0", - "type": "calico", - "log_level": "debug", - "datastore_type": "kubernetes", - "nodename": "__KUBERNETES_NODE_NAME__", - "ipam": { + "name": "k8s-pod-network", + "cniVersion": "0.3.1", + "plugins": [ + { + "type": "calico", + "log_level": "debug", + "datastore_type": "kubernetes", + "nodename": "__KUBERNETES_NODE_NAME__", + "ipam": { "type": "host-local", "subnet": "usePodCidr" - }, - "policy": { + }, + "policy": { "type": "k8s", "k8s_auth_token": "__SERVICEACCOUNT_TOKEN__" - }, - "kubernetes": { + }, + "kubernetes": { "k8s_api_root": "https://__KUBERNETES_SERVICE_HOST__:__KUBERNETES_SERVICE_PORT__", "kubeconfig": "__KUBECONFIG_FILEPATH__" + } + }, + { + "type": "portmap", + "capabilities": { + "portMappings": true + } } + ] } `) @@ -1413,6 +1423,8 @@ spec: image: {{ .Images.CalicoCNI }} command: ["/install-cni.sh"] env: + - name: CNI_CONF_NAME + value: 10-calico.conflist - name: CNI_NETWORK_CONFIG valueFrom: configMapKeyRef: