From 6e085a168e22276756d6dcce4caec992eddebe86 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 16 Jul 2021 14:59:16 +0000 Subject: [PATCH] coreos-base/flatcar-eks: update supported kubernetes versions for cgroupv2 We are switching flatcar to cgroupv2 which is support by docker 20.10 and kubernetes 1.19. This requires setting the systemd cgroup driver in the kubelet config. Due to the unified cgroup hierarchy, kubernetes <1.19 will not work so remove all older versions. Signed-off-by: Jeremi Piotrowski --- .../coreos-base/flatcar-eks/files/docker-daemon.json | 3 +++ .../coreos-base/flatcar-eks/files/download-kubelet.sh | 10 ++++++++++ .../coreos-base/flatcar-eks/files/kubelet-config.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/docker-daemon.json b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/docker-daemon.json index cf5459f51e..4d4b2a5e72 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/docker-daemon.json +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/docker-daemon.json @@ -1,5 +1,8 @@ { "bridge": "none", + "exec-opts": [ + "native.cgroupdriver=systemd" + ], "log-driver": "json-file", "log-opts": { "max-size": "10m", diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh index 5ca6d9ff2f..075974c94b 100755 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/download-kubelet.sh @@ -20,7 +20,17 @@ if [[ -z "${CLUSTER_VERSION}" ]]; then fi # Select the right path depending on the Kubernetes version. +# https://github.com/awslabs/amazon-eks-ami/blob/master/Makefile case $CLUSTER_VERSION in + 1.21) + S3_PATH="1.21.2/2021-07-05" + ;; + 1.20) + S3_PATH="1.20.4/2021-04-12" + ;; + 1.19) + S3_PATH="1.19.6/2021-01-05" + ;; 1.18) S3_PATH="1.18.9/2020-11-02" ;; diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/kubelet-config.json b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/kubelet-config.json index b78510c6a6..607de83feb 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/kubelet-config.json +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/flatcar-eks/files/kubelet-config.json @@ -24,7 +24,7 @@ "clusterDomain": "cluster.local", "hairpinMode": "hairpin-veth", "readOnlyPort": 0, - "cgroupDriver": "cgroupfs", + "cgroupDriver": "systemd", "cgroupRoot": "/", "featureGates": { "RotateKubeletServerCertificate": true