From b292a1ee0b1f0a5ba5e6bd85d0ea6ac3d5db3793 Mon Sep 17 00:00:00 2001 From: Aleksander Morozov Date: Wed, 27 Sep 2017 11:34:25 +0300 Subject: [PATCH] Fix kube system NS provisioning NS must be created only on the first kube-master. --- roles/kubernetes/master/tasks/static-pod-setup.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes/master/tasks/static-pod-setup.yml b/roles/kubernetes/master/tasks/static-pod-setup.yml index d20557e95..32ac5c2cb 100644 --- a/roles/kubernetes/master/tasks/static-pod-setup.yml +++ b/roles/kubernetes/master/tasks/static-pod-setup.yml @@ -17,7 +17,7 @@ - name: Check if kube system namespace exists command: "{{ bin_dir }}/kubectl get ns {{system_namespace}}" - register: 'kubesystem' + register: check_system_ns changed_when: False failed_when: False when: inventory_hostname == groups['kube-master'][0] @@ -30,7 +30,7 @@ register: create_system_ns until: create_system_ns.rc == 0 changed_when: False - when: kubesystem.rc != 0 and inventory_hostname == groups['kube-master'][0] + when: inventory_hostname == groups['kube-master'][0] and check_system_ns|failed tags: apps - name: Write kube-scheduler kubeconfig