diff --git a/resources/flannel/daemonset.yaml b/resources/flannel/daemonset.yaml index 731891e..d310e56 100644 --- a/resources/flannel/daemonset.yaml +++ b/resources/flannel/daemonset.yaml @@ -32,6 +32,21 @@ spec: - key: ${key} operator: Exists %{~ endfor ~} + initContainers: + - name: install-cni + image: ${flannel_cni_image} + command: ["/install-cni.sh"] + env: + - name: CNI_NETWORK_CONFIG + valueFrom: + configMapKeyRef: + name: flannel-config + key: cni-conf.json + volumeMounts: + - name: cni-bin-dir + mountPath: /host/opt/cni/bin/ + - name: cni-conf-dir + mountPath: /host/etc/cni/net.d containers: - name: flannel image: ${flannel_image} @@ -59,20 +74,6 @@ spec: mountPath: /etc/kube-flannel/ - name: run-flannel mountPath: /run/flannel - - name: install-cni - image: ${flannel_cni_image} - command: ["/install-cni.sh"] - env: - - name: CNI_NETWORK_CONFIG - valueFrom: - configMapKeyRef: - name: flannel-config - key: cni-conf.json - volumeMounts: - - name: cni-bin-dir - mountPath: /host/opt/cni/bin/ - - name: cni-conf-dir - mountPath: /host/etc/cni/net.d volumes: - name: flannel-config configMap: diff --git a/variables.tf b/variables.tf index b8b5eba..62978e9 100644 --- a/variables.tf +++ b/variables.tf @@ -74,7 +74,7 @@ variable "container_images" { calico_cni = "quay.io/calico/cni:v3.15.1" coredns = "k8s.gcr.io/coredns:1.7.0" flannel = "quay.io/coreos/flannel:v0.12.0-amd64" - flannel_cni = "quay.io/coreos/flannel-cni:v0.3.0" + flannel_cni = "quay.io/poseidon/flannel-cni:v0.4.0" kube_apiserver = "k8s.gcr.io/kube-apiserver:v1.18.6" kube_controller_manager = "k8s.gcr.io/kube-controller-manager:v1.18.6" kube_scheduler = "k8s.gcr.io/kube-scheduler:v1.18.6"