From 76b72338daf5ce72e7a484b9af20ca2c063cdb78 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Mon, 28 Aug 2017 21:11:01 +0300 Subject: [PATCH] Add CNI config for rkt kubelet (#1579) --- roles/kubernetes/node/templates/kubelet.rkt.service.j2 | 2 +- roles/kubernetes/preinstall/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes/node/templates/kubelet.rkt.service.j2 b/roles/kubernetes/node/templates/kubelet.rkt.service.j2 index 1f181a89d..592d70c2b 100644 --- a/roles/kubernetes/node/templates/kubelet.rkt.service.j2 +++ b/roles/kubernetes/node/templates/kubelet.rkt.service.j2 @@ -32,7 +32,7 @@ ExecStart=/usr/bin/rkt run \ --volume var-lib-docker,kind=host,source={{ docker_daemon_graph }},readOnly=false \ --volume var-lib-kubelet,kind=host,source=/var/lib/kubelet,readOnly=false,recursive=true \ --volume var-log,kind=host,source=/var/log \ -{% if kube_network_plugin in ["calico", "weave", "canal"] %} +{% if kube_network_plugin in ["calico", "weave", "canal", "flannel"] %} --volume etc-cni,kind=host,source=/etc/cni,readOnly=true \ --volume opt-cni,kind=host,source=/opt/cni,readOnly=true \ --volume var-lib-cni,kind=host,source=/var/lib/cni,readOnly=false \ diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index b6a246684..65716816e 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -85,7 +85,7 @@ - "/etc/cni/net.d" - "/opt/cni/bin" when: - - kube_network_plugin in ["calico", "weave", "canal"] + - kube_network_plugin in ["calico", "weave", "canal", "flannel"] - inventory_hostname in groups['k8s-cluster'] tags: [network, calico, weave, canal, bootstrap-os]