From f9393fd0dac12a5e27eaf195d27cabcf376d9701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Tue, 15 Aug 2023 21:58:23 +0300 Subject: [PATCH] Add Ansible task to configure graceful shutdown of Kubelet --- ansible-kubernetes.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible-kubernetes.yml b/ansible-kubernetes.yml index 39a6f15..e39d6ae 100644 --- a/ansible-kubernetes.yml +++ b/ansible-kubernetes.yml @@ -1,4 +1,18 @@ --- +- name: Reconfigure graceful shutdown for kubelet + hosts: kubernetes + tasks: + - name: Reconfigure shutdownGracePeriod + ansible.builtin.lineinfile: + path: /var/lib/kubelet/config.yaml + regexp: '^shutdownGracePeriod:' + line: 'shutdownGracePeriod: 5m' + - name: Reconfigure shutdownGracePeriodCriticalPods + ansible.builtin.lineinfile: + path: /var/lib/kubelet/config.yaml + regexp: '^shutdownGracePeriodCriticalPods:' + line: 'shutdownGracePeriodCriticalPods: 5m' + - name: Pin kube components hosts: kubernetes tasks: