Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use dl.k8s.io where possible #252

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,7 @@ function load-or-gen-kube-basicauth() {
function set_binary_version() {
if [[ "${1}" =~ "/" ]]; then
IFS='/' read -r -a path <<< "${1}"
if [[ "${path[0]}" == "release" ]]; then
KUBE_VERSION=$(gsutil cat "gs://kubernetes-release/${1}.txt")
else
KUBE_VERSION=$(gsutil cat "gs://kubernetes-release-dev/${1}.txt")
fi
KUBE_VERSION=$(curl -Ls "https://dl.k8s.io/${1}.txt")
else
KUBE_VERSION=${1}
fi
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3018,7 +3018,7 @@ You can find documentation for Kubernetes at:
The source for this release can be found at:
/home/kubernetes/kubernetes-src.tar.gz
Or you can download it at:
https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz
https://dl.k8s.io/release/${version}/kubernetes-src.tar.gz

It is based on the Kubernetes source at:
https://github.com/kubernetes/kubernetes/tree/${gitref}
Expand Down
4 changes: 2 additions & 2 deletions cluster/gce/gci/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function install-gci-mounter-tools {
mkdir -p "${CONTAINERIZED_MOUNTER_HOME}"
chmod a+x "${CONTAINERIZED_MOUNTER_HOME}"
mkdir -p "${CONTAINERIZED_MOUNTER_HOME}/rootfs"
download-or-bust "${mounter_tar_sha}" "https://storage.googleapis.com/kubernetes-release/gci-mounter/mounter.tar"
download-or-bust "${mounter_tar_sha}" "https://dl.k8s.io/gci-mounter/mounter.tar"
cp "${KUBE_HOME}/kubernetes/server/bin/mounter" "${CONTAINERIZED_MOUNTER_HOME}/mounter"
chmod a+x "${CONTAINERIZED_MOUNTER_HOME}/mounter"
mv "${KUBE_HOME}/mounter.tar" /tmp/mounter.tar
Expand All @@ -271,7 +271,7 @@ function install-node-problem-detector {
fi

echo "Downloading ${npd_tar}."
local -r npd_release_path="${NODE_PROBLEM_DETECTOR_RELEASE_PATH:-https://storage.googleapis.com/kubernetes-release}"
local -r npd_release_path="${NODE_PROBLEM_DETECTOR_RELEASE_PATH:-https://dl.k8s.io}"
download-or-bust "${npd_hash}" "${npd_release_path}/node-problem-detector/${npd_tar}"
local -r npd_dir="${KUBE_HOME}/node-problem-detector"
mkdir -p "${npd_dir}"
Expand Down
6 changes: 3 additions & 3 deletions cluster/gce/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ function usage() {
local release_latest
local ci_latest

release_stable=$(gsutil cat gs://kubernetes-release/release/stable.txt)
release_latest=$(gsutil cat gs://kubernetes-release/release/latest.txt)
ci_latest=$(gsutil cat gs://kubernetes-release-dev/ci/latest.txt)
release_stable=$(curl -Ls https://dl.k8s.io/release/stable.txt)
release_latest=$(curl -Ls https://dl.k8s.io/release/latest.txt)
ci_latest=$(curl -Ls https://dl.k8s.io/ci/latest.txt)

echo "Right now, versions are as follows:"
echo " release/stable: ${0} ${release_stable}"
Expand Down
6 changes: 3 additions & 3 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,13 @@ function tars_from_version() {
find-release-tars
upload-tars
elif [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then
SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz"
SERVER_BINARY_TAR_URL="https://dl.k8s.io/release/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz"
# TODO: Clean this up.
KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}"
KUBE_MANIFESTS_TAR_HASH=$(curl "${KUBE_MANIFESTS_TAR_URL}" --silent --show-error | ${sha512sum})
KUBE_MANIFESTS_TAR_HASH=${KUBE_MANIFESTS_TAR_HASH%%[[:blank:]]*}
elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then
SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release-dev/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz"
SERVER_BINARY_TAR_URL="https://dl.k8s.io-dev/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz"
# TODO: Clean this up.
KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}"
KUBE_MANIFESTS_TAR_HASH=$(curl "${KUBE_MANIFESTS_TAR_URL}" --silent --show-error | ${sha512sum})
Expand Down Expand Up @@ -1699,7 +1699,7 @@ function setup-easyrsa {
# Note: This was heavily cribbed from make-ca-cert.sh
(set -x
cd "${KUBE_TEMP}"
curl -L -O --connect-timeout 20 --retry 6 --retry-delay 2 https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz
curl -L -O --connect-timeout 20 --retry 6 --retry-delay 2 https://dl.k8s.io/easy-rsa/easy-rsa.tar.gz
tar xzf easy-rsa.tar.gz
mkdir easy-rsa-master/kubelet
cp -r easy-rsa-master/easyrsa3/* easy-rsa-master/kubelet
Expand Down
2 changes: 1 addition & 1 deletion cluster/get-kube-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#
# Set KUBERNETES_SKIP_CONFIRM to skip the installation confirmation prompt.
# Set KUBERNETES_RELEASE_URL to choose where to download binaries from.
# (Defaults to https://storage.googleapis.com/kubernetes-release/release).
# (Defaults to https://dl.k8s.io).
# Set KUBERNETES_DOWNLOAD_TESTS to additionally download and extract the test
# binaries tarball.

Expand Down
2 changes: 1 addition & 1 deletion cluster/get-kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# stable release, (e.g. 'v1.3.7').
# See https://github.com/kubernetes/kubernetes/releases for release options.
# Set KUBERNETES_RELEASE_URL to choose where to download binaries from.
# (Defaults to https://storage.googleapis.com/kubernetes-release/release).
# (Defaults to https://dl.k8s.io/release).
#
# Set KUBERNETES_SERVER_ARCH to choose the server (Kubernetes cluster)
# architecture to download:
Expand Down
4 changes: 2 additions & 2 deletions defs/repo_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pkg_tar(
"""

def _archive_url(folder, version, archive):
return paths.join("https://storage.googleapis.com", folder, version, archive)
return paths.join("https://dl.k8s.io", folder, version, archive)

def _fetch_kube_release(ctx):
build_file_contents = BUILD_PRELUDE
Expand All @@ -33,7 +33,7 @@ def _fetch_kube_release(ctx):
fetch_kube_release = repository_rule(
implementation = _fetch_kube_release,
attrs = {
"folder": attr.string(default = "kubernetes-release/release"),
"folder": attr.string(default = "release"),
"version": attr.string(mandatory = True),
"archives": attr.string_dict(mandatory = True),
},
Expand Down