From 1abeffdac6339792c75bac5a5266e7247a7bd75f Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Tue, 17 Sep 2024 10:15:44 +0100 Subject: [PATCH] kata-deploy: Switch Kubernetes URL The payload build is failing with: ``` ERROR: failed to solve: process "/bin/sh -c apk --no-cache add bash curl && ARCH=$(uname -m) && if [ \"${ARCH}\" = \"x86_64\" ]; then ARCH=amd64; fi && if [ \"${ARCH}\" = \"aarch64\" ]; then ARCH=arm64; fi && DEBIAN_ARCH=${ARCH} && if [ \"${DEBIAN_ARCH}\" = \"ppc64le\" ]; then DEBIAN_ARCH=ppc64el; fi && curl -fL --progress-bar -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/ \ $(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl && chmod +x /usr/bin/kubectl && curl -fL --progress-bar -o /usr/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-${DEBIAN_ARCH} && chmod +x /usr/bin/jq && mkdir -p ${DESTINATION} && tar xvf ${WORKDIR}/${KATA_ARTIFACTS} -C ${DESTINATION} && rm -f ${WORKDIR}/${KATA_ARTIFACTS} && apk del curl && apk --no-cache add py3-pip && pip install --no-cache-dir yq==3.2.3" did not complete successfully: exit code: 22 ``` Looking into this, the problem is that https://storage.googleapis.com/kubernetes-release/release/v1.31.1/bin/linux/amd64/kubectl doesn't exist. The [kubectl install doc](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-kubectl-on-linux) recommends the `dl.k8s.io` site, so let's switch to this. Signed-off-by: stevenhorsman --- tools/packaging/kata-deploy/Dockerfile | 2 +- tools/packaging/kata-deploy/action/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/packaging/kata-deploy/Dockerfile b/tools/packaging/kata-deploy/Dockerfile index 1a30e3b84f..6fbcf578c6 100644 --- a/tools/packaging/kata-deploy/Dockerfile +++ b/tools/packaging/kata-deploy/Dockerfile @@ -25,7 +25,7 @@ RUN \ if [ "${ARCH}" = "aarch64" ]; then ARCH=arm64; fi && \ DEBIAN_ARCH=${ARCH} && \ if [ "${DEBIAN_ARCH}" = "ppc64le" ]; then DEBIAN_ARCH=ppc64el; fi && \ - curl -fL --progress-bar -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl && \ + curl -fL --progress-bar -o /usr/bin/kubectl https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl && \ chmod +x /usr/bin/kubectl && \ curl -fL --progress-bar -o /usr/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-${DEBIAN_ARCH} && \ chmod +x /usr/bin/jq && \ diff --git a/tools/packaging/kata-deploy/action/Dockerfile b/tools/packaging/kata-deploy/action/Dockerfile index 6e5605a441..98bb3fc37f 100644 --- a/tools/packaging/kata-deploy/action/Dockerfile +++ b/tools/packaging/kata-deploy/action/Dockerfile @@ -16,7 +16,7 @@ ENV GITHUB_ACTION_NAME="Test kata-deploy in an AKS cluster" # PKG_SHA environment variable ENV PKG_SHA=HEAD -RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${ARCH}/kubectl" \ +RUN curl -LO "https://dl.k8s.io/release/$(curl -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" \ && chmod +x ./kubectl \ && mv ./kubectl /usr/local/bin/kubectl