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

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 12:43:16 -05:00
parent 8fd7ec08ee
commit f0c142b023
No known key found for this signature in database
3 changed files with 10 additions and 10 deletions

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