diff --git a/roles/kubernetes/kubeadm/handlers/main.yml b/roles/kubernetes/kubeadm/handlers/main.yml index 216090070..4c2b1257c 100644 --- a/roles/kubernetes/kubeadm/handlers/main.yml +++ b/roles/kubernetes/kubeadm/handlers/main.yml @@ -1,5 +1,15 @@ --- -- name: restart kubelet +- name: Kubeadm | restart kubelet + command: /bin/true + notify: + - Kubeadm | reload systemd + - Kubeadm | reload kubelet + +- name: Kubeadm | reload systemd + systemd: + daemon_reload: true + +- name: Kubeadm | reload kubelet service: name: kubelet state: restarted diff --git a/roles/kubernetes/kubeadm/tasks/main.yml b/roles/kubernetes/kubeadm/tasks/main.yml index 7851973ae..42b2596fc 100644 --- a/roles/kubernetes/kubeadm/tasks/main.yml +++ b/roles/kubernetes/kubeadm/tasks/main.yml @@ -101,7 +101,7 @@ - kubeadm_config_api_fqdn is not defined - not is_kube_master - kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "") - notify: restart kubelet + notify: Kubeadm | restart kubelet # FIXME(mattymo): Need to point to localhost, otherwise masters will all point # incorrectly to first master, creating SPoF. diff --git a/roles/kubernetes/node/handlers/main.yml b/roles/kubernetes/node/handlers/main.yml index 352a5a652..732b15082 100644 --- a/roles/kubernetes/node/handlers/main.yml +++ b/roles/kubernetes/node/handlers/main.yml @@ -1,5 +1,5 @@ --- -- name: restart kubelet +- name: Node | restart kubelet command: /bin/true notify: - Kubelet | reload systemd diff --git a/roles/kubernetes/node/tasks/install.yml b/roles/kubernetes/node/tasks/install.yml index dddefb7a3..911d5d8b3 100644 --- a/roles/kubernetes/node/tasks/install.yml +++ b/roles/kubernetes/node/tasks/install.yml @@ -35,7 +35,7 @@ tags: - kubelet - upgrade - notify: restart kubelet + notify: Node | restart kubelet - name: install | Set kubelet binary permissions file: diff --git a/roles/kubernetes/node/tasks/kubelet.yml b/roles/kubernetes/node/tasks/kubelet.yml index 2ba359fea..ca3945615 100644 --- a/roles/kubernetes/node/tasks/kubelet.yml +++ b/roles/kubernetes/node/tasks/kubelet.yml @@ -23,7 +23,7 @@ src: "kubelet.env.{{ kubeadmConfig_api_version }}.j2" dest: "{{ kube_config_dir }}/kubelet.env" backup: yes - notify: restart kubelet + notify: Node | restart kubelet when: kubeadm_output.stdout is version('v1.13.0', '>=') tags: - kubelet @@ -43,7 +43,7 @@ src: "kubelet.service.j2" dest: "/etc/systemd/system/kubelet.service" backup: "yes" - notify: restart kubelet + notify: Node | restart kubelet tags: - kubelet - kubeadm diff --git a/roles/kubernetes/node/tasks/main.yml b/roles/kubernetes/node/tasks/main.yml index 14bad2b8d..bf7d51262 100644 --- a/roles/kubernetes/node/tasks/main.yml +++ b/roles/kubernetes/node/tasks/main.yml @@ -221,7 +221,7 @@ when: - cloud_provider is defined - cloud_provider in [ 'openstack', 'azure', 'vsphere', 'aws' ] - notify: restart kubelet + notify: Node | restart kubelet tags: - cloud-provider