Replace cdn.dl.k8s.io with dl.k8s.io (#227) (#228)
Some checks failed
Run prettify / Prettier Check (push) Has been cancelled
Run unit tests. / build (push) Has been cancelled
Integration test for setup-kubectl / Validate release and master branch (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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