Merge "Support K8s 1.24+"

This commit is contained in:
Zuul 2022-09-26 17:11:03 +00:00 committed by Gerrit Code Review
commit 0748588e79
3 changed files with 9 additions and 2 deletions

View File

@ -451,7 +451,6 @@ if [ -f /etc/sysconfig/docker ] ; then
sed -i -E 's/^OPTIONS=("|'"'"')/OPTIONS=\1'"${DOCKER_OPTIONS}"' /' /etc/sysconfig/docker
fi
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
KUBELET_ARGS="${KUBELET_ARGS} --register-with-taints=node-role.kubernetes.io/master=:NoSchedule"
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=magnum.openstack.org/role=${NODEGROUP_ROLE}"
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=magnum.openstack.org/nodegroup=${NODEGROUP_NAME}"
@ -500,6 +499,8 @@ if [ ${CONTAINER_RUNTIME} = "containerd" ] ; then
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime=remote"
KUBELET_ARGS="${KUBELET_ARGS} --runtime-request-timeout=15m"
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime-endpoint=unix:///run/containerd/containerd.sock"
else
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
fi
if [ -z "${KUBE_NODE_IP}" ]; then

View File

@ -278,6 +278,8 @@ if [ ${CONTAINER_RUNTIME} = "containerd" ] ; then
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime=remote"
KUBELET_ARGS="${KUBELET_ARGS} --runtime-request-timeout=15m"
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime-endpoint=unix:///run/containerd/containerd.sock"
else
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
fi
auto_healing_enabled=$(echo ${AUTO_HEALING_ENABLED} | tr '[:upper:]' '[:lower:]')
@ -286,7 +288,6 @@ if [[ "${auto_healing_enabled}" = "true" && "${autohealing_controller}" = "drain
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=draino-enabled=true"
fi
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
sed -i '
/^KUBELET_ADDRESS=/ s/=.*/="--address=0.0.0.0"/

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Support K8s 1.24 which removed support of dockershim. Needs containerd as
container runtime.