Skip to content

Commit e7b88b3

Browse files
authored
Merge pull request #144 from stackhpc/yoga_1_24
Support K8s 1.24+
2 parents 970e6ba + 6372102 commit e7b88b3

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ if [ -f /etc/sysconfig/docker ] ; then
453453
sed -i -E 's/^OPTIONS=("|'"'"')/OPTIONS=\1'"${DOCKER_OPTIONS}"' /' /etc/sysconfig/docker
454454
fi
455455

456-
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
457456
KUBELET_ARGS="${KUBELET_ARGS} --register-with-taints=node-role.kubernetes.io/master=:NoSchedule"
458457
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=magnum.openstack.org/role=${NODEGROUP_ROLE}"
459458
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=magnum.openstack.org/nodegroup=${NODEGROUP_NAME}"
@@ -501,6 +500,8 @@ if [ ${CONTAINER_RUNTIME} = "containerd" ] ; then
501500
KUBELET_ARGS="${KUBELET_ARGS} --runtime-cgroups=/system.slice/containerd.service"
502501
KUBELET_ARGS="${KUBELET_ARGS} --runtime-request-timeout=15m"
503502
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime-endpoint=unix:///run/containerd/containerd.sock"
503+
else
504+
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
504505
fi
505506

506507
if [ -z "${KUBE_NODE_IP}" ]; then

magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ if [ ${CONTAINER_RUNTIME} = "containerd" ] ; then
277277
KUBELET_ARGS="${KUBELET_ARGS} --runtime-cgroups=/system.slice/containerd.service"
278278
KUBELET_ARGS="${KUBELET_ARGS} --runtime-request-timeout=15m"
279279
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime-endpoint=unix:///run/containerd/containerd.sock"
280+
else
281+
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
280282
fi
281283

282284
auto_healing_enabled=$(echo ${AUTO_HEALING_ENABLED} | tr '[:upper:]' '[:lower:]')
@@ -285,7 +287,6 @@ if [[ "${auto_healing_enabled}" = "true" && "${autohealing_controller}" = "drain
285287
KUBELET_ARGS="${KUBELET_ARGS} --node-labels=draino-enabled=true"
286288
fi
287289

288-
KUBELET_ARGS="${KUBELET_ARGS} --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
289290

290291
sed -i '
291292
/^KUBELET_ADDRESS=/ s/=.*/="--address=0.0.0.0"/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Support K8s 1.24 which removed support of dockershim. Needs containerd as
5+
container runtime.

0 commit comments

Comments
 (0)