Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/scripts/generate-image-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import os
import re
import sys
import urllib.error
import urllib.parse
import urllib.request

Expand Down Expand Up @@ -85,14 +84,26 @@ def _build_ref(repository: str, image: str, version: str) -> str | None:
# ---------------------------------------------------------------------------

def _registry_token(registry_host: str, namespace: str) -> str:
"""Obtain an anonymous Bearer token for pulling from nvcr.io.
"""Obtain an anonymous Bearer token for listing image tags.

nvcr.io advertises:
WWW-Authenticate: Bearer realm="https://nvcr.io/proxy_auth",scope=""
nvcr.io uses a non-standard token endpoint:
WWW-Authenticate: Bearer realm="https://nvcr.io/proxy_auth",scope=""
A GET to that realm with the desired scope returns {"token": "…"}.

GHCR exposes its token endpoint directly.
"""
scope = f"repository:{namespace}:pull"
token_url = f"https://{registry_host}/proxy_auth?scope={urllib.parse.quote(scope)}"

if registry_host == "nvcr.io":
token_url = f"https://{registry_host}/proxy_auth?scope={urllib.parse.quote(scope)}"
elif registry_host == "ghcr.io":
token_url = (
f"https://{registry_host}/token?service=ghcr.io&"
f"scope={urllib.parse.quote(scope)}"
)
else:
raise ValueError(f"Registry tag discovery is not supported for {registry_host}")

request = urllib.request.Request(token_url, headers={"Accept": "application/json"})
with urllib.request.urlopen(request, timeout=15) as response:
data = json.loads(response.read())
Expand Down Expand Up @@ -256,6 +267,14 @@ def add_os_variants(repository: str, image: str, version: str) -> None:
(driver.get("version") or "").strip(),
)

# NVIDIA DRA Driver
dra_driver = values.get("draDriver", {})
add_image_ref(
dra_driver.get("repository", ""),
dra_driver.get("image", ""),
dra_driver.get("version", ""),
)

# k8s-driver-manager
driver_manager = driver.get("manager", {})
add_image_ref(
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-rc-assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ on:
olm_bundle_os_suffix:
description: "OS suffix used for OLM bundle driver and GDRCopy images"
required: false
default: "rhel9.6"
default: "rhel9"
type: string

permissions: {}
Expand Down
Loading