Skip to content

Commit 3d4cbc6

Browse files
mnasiadkaAlex-Welsh
authored andcommitted
Use ssh_cmd to get kubelet version
(cherry picked from commit cb52da1) (cherry picked from commit 560855c) (cherry picked from commit 835329c) (cherry picked from commit f040b79)
1 parent e0c7398 commit 3d4cbc6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ KUBELET_ARGS="${KUBELET_ARGS} --cgroup-driver=${CGROUP_DRIVER}"
502502

503503
if [ ${CONTAINER_RUNTIME} = "containerd" ] ; then
504504
# check kubelet version, 1.27.0 dropped docker shim and --container-runtime command line option
505-
KUBELET_VERSION=$(podman run ${CONTAINER_INFRA_PREFIX:-${HYPERKUBE_PREFIX}}hyperkube:${KUBE_TAG} kubelet --version | awk '{print $2}')
505+
KUBELET_VERSION=$($ssh_cmd podman run ${CONTAINER_INFRA_PREFIX:-${HYPERKUBE_PREFIX}}hyperkube:${KUBE_TAG} kubelet --version | awk '{print $2}')
506506
CONTAINER_RUNTIME_REMOTE_DROPPED="v1.27.0"
507507
if [[ "${CONTAINER_RUNTIME_REMOTE_DROPPED}" != $(echo -e "${CONTAINER_RUNTIME_REMOTE_DROPPED}\n${KUBELET_VERSION}" | sort -V | head -n1) && "${KUBELET_VERSION}" != "devel" ]]; then
508508
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime=remote"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ KUBELET_ARGS="${KUBELET_ARGS} --client-ca-file=${CERT_DIR}/ca.crt --tls-cert-fil
279279
KUBELET_ARGS="${KUBELET_ARGS} --cgroup-driver=${CGROUP_DRIVER}"
280280
if [ ${CONTAINER_RUNTIME} = "containerd" ] ; then
281281
# check kubelet version, 1.27.0 dropped docker shim and --container-runtime command line option
282-
KUBELET_VERSION=$(podman run ${CONTAINER_INFRA_PREFIX:-${HYPERKUBE_PREFIX}}hyperkube:${KUBE_TAG} kubelet --version | awk '{print $2}')
282+
KUBELET_VERSION=$($ssh_cmd podman run ${CONTAINER_INFRA_PREFIX:-${HYPERKUBE_PREFIX}}hyperkube:${KUBE_TAG} kubelet --version | awk '{print $2}')
283283
CONTAINER_RUNTIME_REMOTE_DROPPED="v1.27.0"
284284
if [[ "${CONTAINER_RUNTIME_REMOTE_DROPPED}" != $(echo -e "${CONTAINER_RUNTIME_REMOTE_DROPPED}\n${KUBELET_VERSION}" | sort -V | head -n1) && "${KUBELET_VERSION}" != "devel" ]]; then
285285
KUBELET_ARGS="${KUBELET_ARGS} --container-runtime=remote"

0 commit comments

Comments
 (0)