Skip to content

Commit

Permalink
fix an issue where the containerd health check failed on k8s 1.32 (#5565
Browse files Browse the repository at this point in the history
)

* fix an issue where the containerd health check failed on k8s 1.32

* use correct function

* F
  • Loading branch information
laverya authored Feb 14, 2025
1 parent 101bd85 commit c995a8e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
7 changes: 4 additions & 3 deletions addons/containerd/1.6.33/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 4 additions & 3 deletions addons/containerd/1.7.25/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 4 additions & 3 deletions addons/containerd/template/base/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
10 changes: 5 additions & 5 deletions addons/containerd/template/testgrid/k8s-ctrd.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: basic containerd and flannel, internal LB, airgap, 1.31
- name: basic containerd and flannel, internal LB, airgap, 1.32
airgap: true
installerSpec:
kubernetes:
version: "1.31.x"
version: "1.32.x"
flannel:
version: latest
containerd:
Expand Down Expand Up @@ -345,7 +345,7 @@
- name: "Upgrade Containerd from current to __testver__"
installerSpec:
kubernetes:
version: "1.25.x"
version: "1.32.x"
flannel:
version: latest
containerd:
Expand All @@ -362,7 +362,7 @@
version: latest
upgradeSpec:
kubernetes:
version: "1.25.x"
version: "1.32.x"
flannel:
version: latest
containerd:
Expand Down Expand Up @@ -395,7 +395,7 @@
- name: "flannel latest multinode"
installerSpec:
kubernetes:
version: "1.31.x"
version: "1.32.x"
flannel:
version: "latest"
containerd:
Expand Down

0 comments on commit c995a8e

Please sign in to comment.