diff options
author | Di Xu <di.xu@arm.com> | 2018-01-04 18:21:20 +0800 |
---|---|---|
committer | Di Xu <di.xu@arm.com> | 2018-02-13 16:34:50 +0800 |
commit | 098208121bba3ef6d576976c2e975c56f89ae901 (patch) | |
tree | d89ab21e9b44cd9c9fadb64649cd7f9c114d125b /deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks | |
parent | 5dd3af7fd00971a96d91397f9754e6455abb660d (diff) |
add a multus with 2 fannel interfaces installation
Support deploying multus multiple flannel CNI plugins by setting
environment "kube_network_plugin" to "2flannel".
Change-Id: I23a3d42452b4a5e0858a18934f508649f5961e7a
Signed-off-by: Di Xu <di.xu@arm.com>
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks')
-rw-r--r-- | deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml new file mode 100644 index 00000000..a7ff10e2 --- /dev/null +++ b/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml @@ -0,0 +1,22 @@ +--- +- name: "2Flannel | Create ServiceAccount ClusterRole and ClusterRoleBinding" + command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/cni-2flannel-rbac.yml" + run_once: true + when: rbac_enabled and two_flannel_rbac_manifest.changed + +- name: 2Flannel | Start Resources + kube: + name: "kube-2flannel" + kubectl: "{{ bin_dir }}/kubectl" + filename: "{{ kube_config_dir }}/cni-2flannel.yml" + resource: "ds" + namespace: "{{system_namespace}}" + state: "{{ item | ternary('latest','present') }}" + with_items: "{{ two_flannel_manifest.changed }}" + when: inventory_hostname == groups['kube-master'][0] + +- name: 2Flannel | Wait for flannel subnet.env file presence + wait_for: + path: /run/2flannel/networks/subnet1.env + delay: 5 + timeout: 600 |