From 937acc4b5ae029e822c228cf6fb906fa4cbec060 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Tue, 1 Nov 2022 17:23:31 -0700 Subject: [PATCH] Re-enable Graceful Node Shutdown feature * Kubelet GracefulNodeShutdown works, but only partially handles gracefully stopping the Kubelet. The most noticeable drawback is that Completed Pods are left around * Use a project like poseidon/scuttle or a similar systemd unit as a snippet to add drain and/or delete behaviors if desired * This reverts commit 1786e34f33779d93f96b0a4345a7b460e023c892. Rel: * https://www.psdn.io/posts/kubelet-graceful-shutdown/ * https://github.com/poseidon/scuttle --- CHANGES.md | 1 + aws/fedora-coreos/kubernetes/workers/butane/worker.yaml | 2 ++ aws/flatcar-linux/kubernetes/workers/butane/worker.yaml | 2 ++ azure/fedora-coreos/kubernetes/workers/butane/worker.yaml | 2 ++ azure/flatcar-linux/kubernetes/workers/butane/worker.yaml | 2 ++ bare-metal/fedora-coreos/kubernetes/butane/worker.yaml | 2 ++ bare-metal/flatcar-linux/kubernetes/butane/worker.yaml | 2 ++ digital-ocean/fedora-coreos/kubernetes/butane/worker.yaml | 2 ++ digital-ocean/flatcar-linux/kubernetes/butane/worker.yaml | 2 ++ .../fedora-coreos/kubernetes/workers/butane/worker.yaml | 2 ++ .../flatcar-linux/kubernetes/workers/butane/worker.yaml | 2 ++ 11 files changed, 21 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index da366f66..82ef2c66 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Notable changes between versions. * Update Calico from v3.24.1 to [v3.24.3](https://github.com/projectcalico/calico/releases/tag/v3.24.3) * Allow Kubelet kubeconfig to drain nodes, if desired +* Re-enable Kubelet Graceful Node Shutdown ([#1261](https://github.com/poseidon/typhoon/pull/1261)) ### Fedora CoreOS diff --git a/aws/fedora-coreos/kubernetes/workers/butane/worker.yaml b/aws/fedora-coreos/kubernetes/workers/butane/worker.yaml index 37a72a5d..a5682661 100644 --- a/aws/fedora-coreos/kubernetes/workers/butane/worker.yaml +++ b/aws/fedora-coreos/kubernetes/workers/butane/worker.yaml @@ -107,6 +107,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/aws/flatcar-linux/kubernetes/workers/butane/worker.yaml b/aws/flatcar-linux/kubernetes/workers/butane/worker.yaml index 506fb743..ee65d97a 100644 --- a/aws/flatcar-linux/kubernetes/workers/butane/worker.yaml +++ b/aws/flatcar-linux/kubernetes/workers/butane/worker.yaml @@ -106,6 +106,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/azure/fedora-coreos/kubernetes/workers/butane/worker.yaml b/azure/fedora-coreos/kubernetes/workers/butane/worker.yaml index 0a922951..65cb5116 100644 --- a/azure/fedora-coreos/kubernetes/workers/butane/worker.yaml +++ b/azure/fedora-coreos/kubernetes/workers/butane/worker.yaml @@ -102,6 +102,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/azure/flatcar-linux/kubernetes/workers/butane/worker.yaml b/azure/flatcar-linux/kubernetes/workers/butane/worker.yaml index 349d144f..457e9e27 100644 --- a/azure/flatcar-linux/kubernetes/workers/butane/worker.yaml +++ b/azure/flatcar-linux/kubernetes/workers/butane/worker.yaml @@ -102,6 +102,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/bare-metal/fedora-coreos/kubernetes/butane/worker.yaml b/bare-metal/fedora-coreos/kubernetes/butane/worker.yaml index 236508a0..00d3a08b 100644 --- a/bare-metal/fedora-coreos/kubernetes/butane/worker.yaml +++ b/bare-metal/fedora-coreos/kubernetes/butane/worker.yaml @@ -111,6 +111,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/bare-metal/flatcar-linux/kubernetes/butane/worker.yaml b/bare-metal/flatcar-linux/kubernetes/butane/worker.yaml index 3130a7c5..11c962b0 100644 --- a/bare-metal/flatcar-linux/kubernetes/butane/worker.yaml +++ b/bare-metal/flatcar-linux/kubernetes/butane/worker.yaml @@ -116,6 +116,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/digital-ocean/fedora-coreos/kubernetes/butane/worker.yaml b/digital-ocean/fedora-coreos/kubernetes/butane/worker.yaml index 9cedde1a..51cbcfa4 100644 --- a/digital-ocean/fedora-coreos/kubernetes/butane/worker.yaml +++ b/digital-ocean/fedora-coreos/kubernetes/butane/worker.yaml @@ -107,6 +107,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/digital-ocean/flatcar-linux/kubernetes/butane/worker.yaml b/digital-ocean/flatcar-linux/kubernetes/butane/worker.yaml index 84494653..8433497d 100644 --- a/digital-ocean/flatcar-linux/kubernetes/butane/worker.yaml +++ b/digital-ocean/flatcar-linux/kubernetes/butane/worker.yaml @@ -106,6 +106,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/google-cloud/fedora-coreos/kubernetes/workers/butane/worker.yaml b/google-cloud/fedora-coreos/kubernetes/workers/butane/worker.yaml index fec05f29..8671e1df 100644 --- a/google-cloud/fedora-coreos/kubernetes/workers/butane/worker.yaml +++ b/google-cloud/fedora-coreos/kubernetes/workers/butane/worker.yaml @@ -101,6 +101,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf diff --git a/google-cloud/flatcar-linux/kubernetes/workers/butane/worker.yaml b/google-cloud/flatcar-linux/kubernetes/workers/butane/worker.yaml index db0b80c7..832d439e 100644 --- a/google-cloud/flatcar-linux/kubernetes/workers/butane/worker.yaml +++ b/google-cloud/flatcar-linux/kubernetes/workers/butane/worker.yaml @@ -101,6 +101,8 @@ storage: clusterDomain: ${cluster_domain_suffix} healthzPort: 0 rotateCertificates: true + shutdownGracePeriod: 45s + shutdownGracePeriodCriticalPods: 30s staticPodPath: /etc/kubernetes/manifests readOnlyPort: 0 resolvConf: /run/systemd/resolve/resolv.conf