Skip to content

Commit 925ed4b

Browse files
authored
Merge pull request #4958 from spiffxp/use-dl-k8s-io
🌱 Use dl.k8s.io instead of hardcoded GCS URIs
2 parents 831ed7d + be8ce08 commit 925ed4b

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

docs/book/src/developer/providers/implementers-guide/overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ brew install kustomize
3333

3434
```bash
3535
# Install kubectl
36-
KUBECTL_VERSION=$(curl -sf https://storage.googleapis.com/kubernetes-release/release/stable.txt)
37-
curl -fLO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
36+
KUBECTL_VERSION=$(curl -sf https://dl.k8s.io/release/stable.txt)
37+
curl -fLO https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
3838

3939
# Install kustomize
4040
OS_TYPE=linux

hack/ensure-kubectl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ verify_kubectl_version() {
3131
mkdir -p "${GOPATH_BIN}"
3232
fi
3333
echo 'kubectl not found, installing'
34-
curl -sLo "${GOPATH_BIN}/kubectl" https://storage.googleapis.com/kubernetes-release/release/${MINIMUM_KUBECTL_VERSION}/bin/linux/amd64/kubectl
34+
curl -sLo "${GOPATH_BIN}/kubectl" https://dl.k8s.io/release/${MINIMUM_KUBECTL_VERSION}/bin/linux/amd64/kubectl
3535
chmod +x "${GOPATH_BIN}/kubectl"
3636
else
3737
echo "Missing required binary in path: kubectl"

scripts/ci-e2e-lib.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ k8s::resolveVersion() {
8787
fi
8888

8989
if [[ "$version" =~ ^ci/ ]]; then
90-
resolveVersion=$(curl -LsS "http://gcsweb.k8s.io/gcs/kubernetes-release-dev/ci/${version#ci/}.txt")
90+
resolveVersion=$(curl -LsS "http://dl.k8s.io/ci/${version#ci/}.txt")
9191
else
92-
resolveVersion=$(curl -LsS "http://gcsweb.k8s.io/gcs/kubernetes-release/release/${version}.txt")
92+
resolveVersion=$(curl -LsS "http://dl.k8s.io/release/${version}.txt")
9393
fi
9494
echo "+ $variableName=\"$version\" resolved to \"$resolveVersion\""
9595
}
@@ -216,4 +216,4 @@ kind::prepullImage () {
216216
else
217217
echo "+ image $image already present in the system, skipping pre-pull"
218218
fi
219-
}
219+
}

test/framework/kubernetesversions/data/debian_injection_script.envsubst.sh.tpl

+6-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ if [[ "$${KUBERNETES_VERSION}" != "" ]]; then
7474
echo "* testing CI version $${KUBERNETES_VERSION}"
7575
# Check for semver
7676
if [[ "$${KUBERNETES_VERSION}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
77-
CI_URL="https://storage.googleapis.com/kubernetes-release/release/$${KUBERNETES_VERSION}/bin/linux/amd64"
77+
CI_URL="https://dl.k8s.io/release/$${KUBERNETES_VERSION}/bin/linux/amd64"
7878
VERSION_WITHOUT_PREFIX="$${KUBERNETES_VERSION#v}"
7979
export DEBIAN_FRONTEND=noninteractive
8080
# sometimes the network is not immediately available, so we have to retry the apt-get update
@@ -91,7 +91,7 @@ if [[ "$${KUBERNETES_VERSION}" != "" ]]; then
9191
apt-get install -y "$${CI_PACKAGE}=$${PACKAGE_VERSION}"
9292
done
9393
else
94-
CI_URL="https://storage.googleapis.com/k8s-release-dev/ci/$${KUBERNETES_VERSION}/bin/linux/amd64"
94+
CI_URL="https://dl.k8s.io/ci/$${KUBERNETES_VERSION}/bin/linux/amd64"
9595
for CI_PACKAGE in "$${PACKAGES_TO_TEST[@]}"; do
9696
# Browser: https://console.cloud.google.com/storage/browser/k8s-release-dev?project=k8s-release-dev
9797
# e.g.: https://storage.googleapis.com/k8s-release-dev/ci/v1.21.0-beta.1.378+cf3374e43491c5/bin/linux/amd64/kubectl
@@ -103,8 +103,10 @@ if [[ "$${KUBERNETES_VERSION}" != "" ]]; then
103103
systemctl restart kubelet
104104
fi
105105
for CI_CONTAINER in "$${CONTAINERS_TO_TEST[@]}"; do
106-
# Browser: https://console.cloud.google.com/storage/browser/kubernetes-release?project=kubernetes-release
107-
# e.g.: https://storage.googleapis.com/kubernetes-release/release/v1.20.4/bin/linux/amd64/kube-apiserver.tar
106+
# Redirect: https://dl.k8s.io/release/{path}
107+
# e.g. https://dl.k8s.io/release/v1.20.4/bin/linux/amd64/kube-apiserver.tar
108+
# Browser: https://gcsweb.k8s.io/gcs/kubernetes-release/
109+
# e.g. https://gcsweb.k8s.io/gcs/kubernetes-release/release/v1.20.4/bin/linux/amd64
108110
echo "* downloading package: $${CI_URL}/$${CI_CONTAINER}.$${CONTAINER_EXT}"
109111
wget "$${CI_URL}/$${CI_CONTAINER}.$${CONTAINER_EXT}" -O "$${CI_DIR}/$${CI_CONTAINER}.$${CONTAINER_EXT}"
110112
$${SUDO} ctr -n k8s.io images import "$${CI_DIR}/$${CI_CONTAINER}.$${CONTAINER_EXT}" || echo "* ignoring expected 'ctr images import' result"

test/framework/kubernetesversions/versions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
const (
2929
ciVersionURL = "https://dl.k8s.io/ci/latest.txt"
30-
stableVersionURL = "https://storage.googleapis.com/kubernetes-release/release/stable-%d.%d.txt"
30+
stableVersionURL = "https://dl.k8s.io/release/stable-%d.%d.txt"
3131
tagPrefix = "v"
3232
)
3333

test/infrastructure/docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
5353
# Gets additional CAPD dependencies
5454
WORKDIR /tmp
5555

56-
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.21.2/bin/linux/amd64/kubectl && \
56+
RUN curl -LO https://dl.k8s.io/release/v1.21.2/bin/linux/amd64/kubectl && \
5757
chmod +x ./kubectl && \
5858
mv ./kubectl /usr/bin/kubectl
5959

0 commit comments

Comments
 (0)