From e67f2e4dc38a5cf9e9c537bfc91b36b3515d3f2f Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Fri, 14 Feb 2025 14:57:09 -0500 Subject: [PATCH] update install scripts for containerd 1.6.28+, fix preflights (#5567) --- addons/containerd/1.6.28/install.sh | 7 ++++--- addons/containerd/1.6.31/install.sh | 7 ++++--- addons/containerd/1.6.32/install.sh | 7 ++++--- addons/containerd/1.6.33/host-preflight.yaml | 12 ++++++------ addons/containerd/1.7.25/host-preflight.yaml | 12 ++++++------ 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/addons/containerd/1.6.28/install.sh b/addons/containerd/1.6.28/install.sh index e11a57f0fb..db7f119d03 100644 --- a/addons/containerd/1.6.28/install.sh +++ b/addons/containerd/1.6.28/install.sh @@ -108,9 +108,10 @@ function containerd_install() { systemctl start kubelet # If using the internal load balancer the Kubernetes API server will be unavailable until # kubelet starts the HAProxy static pod. This check ensures the Kubernetes API server - # is available before proceeeding. - # "nodes.v1." is needed becasue addons can have a CRD names "nodes", like nodes.longhorn.io - try_5m kubectl --kubeconfig=/etc/kubernetes/kubelet.conf get nodes.v1. + # is available before proceeding. + # "nodes.v1." is needed because addons can have a CRD names "nodes", like nodes.longhorn.io + # we get the specific node name because as of kubernetes 1.32 the node kubeconfig only has permissions to get the current node + try_5m kubectl --kubeconfig=/etc/kubernetes/kubelet.conf get nodes.v1. "$(get_local_node_name)" fi fi } diff --git a/addons/containerd/1.6.31/install.sh b/addons/containerd/1.6.31/install.sh index e11a57f0fb..db7f119d03 100644 --- a/addons/containerd/1.6.31/install.sh +++ b/addons/containerd/1.6.31/install.sh @@ -108,9 +108,10 @@ function containerd_install() { systemctl start kubelet # If using the internal load balancer the Kubernetes API server will be unavailable until # kubelet starts the HAProxy static pod. This check ensures the Kubernetes API server - # is available before proceeeding. - # "nodes.v1." is needed becasue addons can have a CRD names "nodes", like nodes.longhorn.io - try_5m kubectl --kubeconfig=/etc/kubernetes/kubelet.conf get nodes.v1. + # is available before proceeding. + # "nodes.v1." is needed because addons can have a CRD names "nodes", like nodes.longhorn.io + # we get the specific node name because as of kubernetes 1.32 the node kubeconfig only has permissions to get the current node + try_5m kubectl --kubeconfig=/etc/kubernetes/kubelet.conf get nodes.v1. "$(get_local_node_name)" fi fi } diff --git a/addons/containerd/1.6.32/install.sh b/addons/containerd/1.6.32/install.sh index e11a57f0fb..db7f119d03 100644 --- a/addons/containerd/1.6.32/install.sh +++ b/addons/containerd/1.6.32/install.sh @@ -108,9 +108,10 @@ function containerd_install() { systemctl start kubelet # If using the internal load balancer the Kubernetes API server will be unavailable until # kubelet starts the HAProxy static pod. This check ensures the Kubernetes API server - # is available before proceeeding. - # "nodes.v1." is needed becasue addons can have a CRD names "nodes", like nodes.longhorn.io - try_5m kubectl --kubeconfig=/etc/kubernetes/kubelet.conf get nodes.v1. + # is available before proceeding. + # "nodes.v1." is needed because addons can have a CRD names "nodes", like nodes.longhorn.io + # we get the specific node name because as of kubernetes 1.32 the node kubeconfig only has permissions to get the current node + try_5m kubectl --kubeconfig=/etc/kubernetes/kubelet.conf get nodes.v1. "$(get_local_node_name)" fi fi } diff --git a/addons/containerd/1.6.33/host-preflight.yaml b/addons/containerd/1.6.33/host-preflight.yaml index 03362defb0..93a0f9e8c7 100644 --- a/addons/containerd/1.6.33/host-preflight.yaml +++ b/addons/containerd/1.6.33/host-preflight.yaml @@ -17,15 +17,15 @@ spec: - pass: when: "ol = 7" message: "containerd addon supports ol 7" - - warn: + - pass: when: "centos = 8" - message: "containerd addon supports centos 8, but only up to containerd 1.6.32, which will be installed instead of 1.6.33" - - warn: + message: "containerd addon supports centos 8" + - pass: when: "rhel = 8" - message: "containerd addon supports rhel 8, but only up to containerd 1.6.32, which will be installed instead of 1.6.33" - - warn: + message: "containerd addon supports rhel 8" + - pass: when: "ol = 8" - message: "containerd addon supports ol 8, but only up to containerd 1.6.32, which will be installed instead of 1.6.33" + message: "containerd addon supports ol 8" - pass: when: "centos = 9" message: "containerd addon supports centos 9" diff --git a/addons/containerd/1.7.25/host-preflight.yaml b/addons/containerd/1.7.25/host-preflight.yaml index 8105f8191b..2db92fbe1e 100644 --- a/addons/containerd/1.7.25/host-preflight.yaml +++ b/addons/containerd/1.7.25/host-preflight.yaml @@ -17,15 +17,15 @@ spec: - warn: when: "ol = 7" message: "containerd addon supports ol 7, but only up to containerd 1.6.33, which will be installed instead of 1.7.25" - - warn: + - pass: when: "centos = 8" - message: "containerd addon supports centos 8, but only up to containerd 1.6.32, which will be installed instead of 1.7.25" - - warn: + message: "containerd addon supports centos 8" + - pass: when: "rhel = 8" - message: "containerd addon supports rhel 8, but only up to containerd 1.6.32, which will be installed instead of 1.7.25" - - warn: + message: "containerd addon supports rhel 8" + - pass: when: "ol = 8" - message: "containerd addon supports ol 8, but only up to containerd 1.6.32, which will be installed instead of 1.7.25" + message: "containerd addon supports ol 8" - pass: when: "centos = 9" message: "containerd addon supports centos 9"