Skip to content

Commit

Permalink
Use ssh_cmd to get kubelet version
Browse files Browse the repository at this point in the history
(cherry picked from commit cb52da1)
  • Loading branch information
mnasiadka committed Mar 28, 2024
1 parent 3f901a5 commit 560855c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ KUBELET_ARGS="${KUBELET_ARGS} --cgroup-driver=${CGROUP_DRIVER}"

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

0 comments on commit 560855c

Please sign in to comment.