diff --git a/cmd/kk/pkg/artifact/templates/manifest.go b/cmd/kk/pkg/artifact/templates/manifest.go index 8979fd04e..40762578a 100644 --- a/cmd/kk/pkg/artifact/templates/manifest.go +++ b/cmd/kk/pkg/artifact/templates/manifest.go @@ -37,6 +37,9 @@ spec: {{- range .Options.Arches }} - {{ . }} {{- end }} + {{- if not .Options.OperatingSystems }} + operatingSystems: [] + {{- else }} operatingSystems: {{- range $i, $v := .Options.OperatingSystems }} - arch: {{ $v.Arch }} @@ -49,6 +52,7 @@ spec: localPath: url: {{- end }} + {{- end }} kubernetesDistributions: {{- range $i, $v := .Options.KubernetesDistributions }} - type: {{ $v.Type }} diff --git a/cmd/kk/pkg/files/file.go b/cmd/kk/pkg/files/file.go index dfc298ad8..2e3a31def 100644 --- a/cmd/kk/pkg/files/file.go +++ b/cmd/kk/pkg/files/file.go @@ -112,21 +112,21 @@ func NewKubeBinary(name, arch, version, prePath string, getCmd func(path, url st case kubeadm: component.Type = KUBE component.FileName = kubeadm - component.Url = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubeadm", version, arch) + component.Url = fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/%s/kubeadm", version, arch) if component.Zone == "cn" { component.Url = fmt.Sprintf("https://kubernetes-release.pek3b.qingstor.com/release/%s/bin/linux/%s/kubeadm", version, arch) } case kubelet: component.Type = KUBE component.FileName = kubelet - component.Url = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubelet", version, arch) + component.Url = fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/%s/kubelet", version, arch) if component.Zone == "cn" { component.Url = fmt.Sprintf("https://kubernetes-release.pek3b.qingstor.com/release/%s/bin/linux/%s/kubelet", version, arch) } case kubectl: component.Type = KUBE component.FileName = kubectl - component.Url = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl", version, arch) + component.Url = fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/%s/kubectl", version, arch) if component.Zone == "cn" { component.Url = fmt.Sprintf("https://kubernetes-release.pek3b.qingstor.com/release/%s/bin/linux/%s/kubectl", version, arch) } diff --git a/feature/builtin/roles/init/init-artifact/defaults/main.yaml b/feature/builtin/roles/init/init-artifact/defaults/main.yaml index ed991199d..245a0efae 100644 --- a/feature/builtin/roles/init/init-artifact/defaults/main.yaml +++ b/feature/builtin/roles/init/init-artifact/defaults/main.yaml @@ -26,39 +26,39 @@ artifact: {{- if .kkzone | eq "cn" }} https://kubernetes-release.pek3b.qingstor.com/release/{{ .kube_version }}/bin/linux/amd64/kubeadm {{- else }} - https://storage.googleapis.com/kubernetes-release/release/{{ .kube_version }}/bin/linux/amd64/kubeadm + https://dl.k8s.io/release/{{ .kube_version }}/bin/linux/amd64/kubeadm {{- end }} arm64: | {{- if .kkzone | eq "cn" }} https://kubernetes-release.pek3b.qingstor.com/release/{{ .kube_version }}/bin/linux/arm64/kubeadm {{- else }} - https://storage.googleapis.com/kubernetes-release/release/{{ .kube_version }}/bin/linux/arm64/kubeadm + https://dl.k8s.io/release/{{ .kube_version }}/bin/linux/arm64/kubeadm {{- end }} kubelet: amd64: | {{- if .kkzone | eq "cn" }} https://kubernetes-release.pek3b.qingstor.com/release/{{ .kube_version }}/bin/linux/amd64/kubelet {{- else }} - https://storage.googleapis.com/kubernetes-release/release/{{ .kube_version }}/bin/linux/amd64/kubelet + https://dl.k8s.io/release/{{ .kube_version }}/bin/linux/amd64/kubelet {{- end }} arm64: | {{- if .kkzone | eq "cn" }} https://kubernetes-release.pek3b.qingstor.com/release/{{ .kube_version }}/bin/linux/arm64/kubelet {{- else }} - https://storage.googleapis.com/kubernetes-release/release/{{ .kube_version }}/bin/linux/arm64/kubelet + https://dl.k8s.io/release/{{ .kube_version }}/bin/linux/arm64/kubelet {{- end }} kubectl: amd64: | {{- if .kkzone | eq "cn" }} https://kubernetes-release.pek3b.qingstor.com/release/{{ .kube_version }}/bin/linux/amd64/kubectl {{- else }} - https://storage.googleapis.com/kubernetes-release/release/{{ .kube_version }}/bin/linux/amd64/kubectl + https://dl.k8s.io/release/{{ .kube_version }}/bin/linux/amd64/kubectl {{- end }} arm64: | {{- if .kkzone | eq "cn" }} https://kubernetes-release.pek3b.qingstor.com/release/{{ .kube_version }}/bin/linux/arm64/kubectl {{- else }} - https://storage.googleapis.com/kubernetes-release/release/{{ .kube_version }}/bin/linux/arm64/kubectl + https://dl.k8s.io/release/{{ .kube_version }}/bin/linux/arm64/kubectl {{- end }} cni: amd64: | diff --git a/feature/hack/auto-update-version.py b/feature/hack/auto-update-version.py index f9fa93f99..fcd372a39 100755 --- a/feature/hack/auto-update-version.py +++ b/feature/hack/auto-update-version.py @@ -60,7 +60,7 @@ def fetch_kubernetes_sha256(versions): for binary in K8S_COMPONENTS: for arch in ARCH_LIST: response = requests.get( - "https://storage.googleapis.com/kubernetes-release/release/{}/bin/linux/{}/{}.sha256".format( + "https://dl.k8s.io/release/{}/bin/linux/{}/{}.sha256".format( version, arch, binary)) if response.status_code == 200: new_sha256["{}-{}-{}".format(binary, arch, version)] = response.text diff --git a/feature/hack/fetch-kubernetes-hash.sh b/feature/hack/fetch-kubernetes-hash.sh index 22a4e510e..55339fd79 100755 --- a/feature/hack/fetch-kubernetes-hash.sh +++ b/feature/hack/fetch-kubernetes-hash.sh @@ -33,7 +33,7 @@ do echo "${app}@${arch}" for ver in "${versions[@]}" do - url="https://storage.googleapis.com/kubernetes-release/release/${ver}/bin/linux/${arch}/${app}.sha256" + url="https://dl.k8s.io/release/${ver}/bin/linux/${arch}/${app}.sha256" hash=$(wget --quiet -O - "$url") echo "\"${ver}\": \"${hash}\"," json=$(echo "$json" | jq ".${app}.${arch} += {\"${ver}\":\"${hash}\"}") diff --git a/feature/hack/sync-components.sh b/feature/hack/sync-components.sh index d6585e89c..a0414edaa 100755 --- a/feature/hack/sync-components.sh +++ b/feature/hack/sync-components.sh @@ -90,7 +90,7 @@ if [ $KUBERNETES_VERSION ]; then echo "Synchronizing $binary-$arch" curl -L -o binaries/kube/$KUBERNETES_VERSION/$arch/$binary \ - https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/$arch/$binary + https://dl.k8s.io/release/$KUBERNETES_VERSION/bin/linux/$arch/$binary qsctl cp binaries/kube/$KUBERNETES_VERSION/$arch/$binary \ qs://kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/$arch/$binary \ diff --git a/hack/auto-update-version.py b/hack/auto-update-version.py index f9fa93f99..fcd372a39 100755 --- a/hack/auto-update-version.py +++ b/hack/auto-update-version.py @@ -60,7 +60,7 @@ def fetch_kubernetes_sha256(versions): for binary in K8S_COMPONENTS: for arch in ARCH_LIST: response = requests.get( - "https://storage.googleapis.com/kubernetes-release/release/{}/bin/linux/{}/{}.sha256".format( + "https://dl.k8s.io/release/{}/bin/linux/{}/{}.sha256".format( version, arch, binary)) if response.status_code == 200: new_sha256["{}-{}-{}".format(binary, arch, version)] = response.text diff --git a/hack/fetch-kubernetes-hash.sh b/hack/fetch-kubernetes-hash.sh index 22a4e510e..55339fd79 100755 --- a/hack/fetch-kubernetes-hash.sh +++ b/hack/fetch-kubernetes-hash.sh @@ -33,7 +33,7 @@ do echo "${app}@${arch}" for ver in "${versions[@]}" do - url="https://storage.googleapis.com/kubernetes-release/release/${ver}/bin/linux/${arch}/${app}.sha256" + url="https://dl.k8s.io/release/${ver}/bin/linux/${arch}/${app}.sha256" hash=$(wget --quiet -O - "$url") echo "\"${ver}\": \"${hash}\"," json=$(echo "$json" | jq ".${app}.${arch} += {\"${ver}\":\"${hash}\"}") diff --git a/hack/sync-components.sh b/hack/sync-components.sh index f3a19350f..c1d30e7ea 100755 --- a/hack/sync-components.sh +++ b/hack/sync-components.sh @@ -91,7 +91,7 @@ if [ $KUBERNETES_VERSION ]; then echo "Synchronizing $binary-$arch" curl -L -o binaries/kube/$KUBERNETES_VERSION/$arch/$binary \ - https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/$arch/$binary + https://dl.k8s.io/release/$KUBERNETES_VERSION/bin/linux/$arch/$binary qsctl cp binaries/kube/$KUBERNETES_VERSION/$arch/$binary \ qs://kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/$arch/$binary \