Add Ansible task to configure graceful shutdown of Kubelet

This commit is contained in:
Lauri Võsandi 2023-08-15 21:58:23 +03:00
parent 4c5a58f67d
commit f9393fd0da

View File

@ -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 - name: Pin kube components
hosts: kubernetes hosts: kubernetes
tasks: tasks: