mirror of
https://github.com/Azure/setup-kubectl.git
synced 2026-04-10 04:10:05 +00:00
Remove download redirects, use cdn.dl.k8s.io domain (#219)
dl.k8s.io redirects to cdn.dl.k8s.io which somehow results in constants download errors on a self-hosted runner in the UAE region. Other regions were not affected. Updating the domains fixed the issue
This commit is contained in:
parent
a0bf2818e7
commit
f366ff3801
3 changed files with 8 additions and 8 deletions
|
|
@ -14,14 +14,14 @@ export function getKubectlArch(): string {
|
|||
export function getkubectlDownloadURL(version: string, arch: string): string {
|
||||
switch (os.type()) {
|
||||
case 'Linux':
|
||||
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
|
||||
return `https://cdn.dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
|
||||
|
||||
case 'Darwin':
|
||||
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
|
||||
return `https://cdn.dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
|
||||
|
||||
case 'Windows_NT':
|
||||
default:
|
||||
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
|
||||
return `https://cdn.dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue