Tae Park 7c22500b16 Include kubectl v1.21 and v1.22 to supported list
Adding kubectl version 1.21.14 and 1.22.17 to the list of supported
kubectl versions in the vault manager container image. This is for
supporting platform upgrade from stx.6.0 to stx.8.0.

Test Plan:
PASS Manual build of the image
PASS vault sanity with the new image

Story: 2010930
Task: 49423

Change-Id: Ie10abc6473790cf44b9d69c4d706338d5063aa5b
Signed-off-by: Tae Park <tae.park@windriver.com>
2024-01-18 15:06:52 +00:00

35 lines
1.3 KiB
Docker

from debian:stable-slim
# Support versions of kubernetes back two releases of starlingx
# Versions older than 1.26 can be listed from:
# https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.22.md
# Otherwise the latest minor releases are listed here:
# https://kubernetes.io/releases/
ENV KUBE_LATEST_VERSION="v1.28.4"
ENV KUBE_VERSIONS="v1.28.4 v1.27.8 v1.26.11 v1.25.16 v1.24.17 v1.23.17 v1.22.17 v1.21.14"
ENV KUBECTL_DL_URL="https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl"
ENV KUBECTL_INSTALL_PATH="/usr/local/bin"
RUN set -ex; \
PKG_LIST="mawk bash coreutils curl grep sed jq uuid-runtime"; \
apt-get update && apt-get install -y $PKG_LIST \
&& apt-get clean && rm -r /var/lib/apt/lists/*
# install all of the versions of kubectl
RUN set -ex; \
mkdir -p $KUBECTL_INSTALL_PATH; \
for ver in $KUBE_VERSIONS; do \
fpath=${KUBECTL_INSTALL_PATH}/kubectl.${ver%.*}; \
url="https://storage.googleapis.com/kubernetes-release/release/${ver}/bin/linux/amd64/kubectl"; \
curl -L "$url" -o ${fpath} \
&& chmod +x ${fpath}; \
done
# link the latest version as default
RUN set -ex; \
ln -s ${KUBECTL_INSTALL_PATH}/kubectl.${KUBE_LATEST_VERSION%.*} \
${KUBECTL_INSTALL_PATH}/kubectl
CMD ["bash"]