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)
(cherry picked from commit 560855c)
  • Loading branch information
mnasiadka committed Mar 28, 2024
1 parent b4ed3ec commit 835329c
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 @@ -499,7 +499,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 @@ -275,7 +275,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 835329c

Please sign in to comment.