Replace cdn.dl.k8s.io with dl.k8s.io (#227) (#228)

The cdn.dl.k8s.io domain is no longer available. Switch all download URLs back to dl.k8s.io.
This commit is contained in:
David Gamero
2026-02-18 15:32:20 -05:00
committed by GitHub
parent 8fd7ec08ee
commit ef7e8f900a
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -14,14 +14,14 @@ export function getKubectlArch(): string {
export function getkubectlDownloadURL(version: string, arch: string): string {
switch (os.type()) {
case 'Linux':
return `https://cdn.dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
case 'Darwin':
return `https://cdn.dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
return `https://dl.k8s.io/release/${version}/bin/darwin/${arch}/kubectl`
case 'Windows_NT':
default:
return `https://cdn.dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
return `https://dl.k8s.io/release/${version}/bin/windows/${arch}/kubectl.exe`
}
}
@@ -30,7 +30,7 @@ export async function getLatestPatchVersion(
minor: string
): Promise<string> {
const version = `${major}.${minor}`
const sourceURL = `https://cdn.dl.k8s.io/release/stable-${version}.txt`
const sourceURL = `https://dl.k8s.io/release/stable-${version}.txt`
try {
const downloadPath = await toolCache.downloadTool(sourceURL)
const latestPatch = fs