Files
Ron Compos 55c3d0eaea feat(e2e): NVKE validation image and qualify validate (#2401)
* feat(e2e): validation profile and label exclusions for the validation image

Sites whose layout differs from deploy/nico can now configure the
validation image without their layout living in this repo.

- NVKE_VALIDATE_PROFILE names a YAML file keyed by the existing
  environment variable names. It fills only unset or blank variables
  before the suite is built; the environment wins over the profile, and
  the profile over the built-in defaults. Keys outside an allowlist,
  including the run switches and per-tenant identity, fail the run.
- NVKE_VALIDATE_EXCLUDE_LABELS ANDs label exclusions onto the label
  filter. It refuses site-validate and tenant-validate, and fails a run
  left with no specs.
- Check 31 gains the issues-certificate label so sites whose approver
  policy blocks self-signed issuers can leave it out.
- siteNamespaces and siteLaneChecks become functions so they see
  profile-set values.
- The image workflow dry-runs the entrypoint with a good and a bad
  profile.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): tighten validation profile and exclusions after review

- NVKE_VALIDATE_EXCLUDE_LABELS takes only labels from an allowlist, so
  far issues-certificate. A deny-list let a profile drop the health and
  version checks it is barred from controlling, and accepted typos.
- A variable set blank wins over the profile, so a run can get a
  built-in default back. The profile is applied with t.Setenv so its
  values end with TestE2E.
- The exclusion is recorded by the JUnit LabelFilter property rather
  than a per-container report entry that some runs never wrote.
- The drift test scans the whole module, internal packages included,
  for every input prefix; NKE_E2E_AUDIENCE becomes a profile key and
  the auth switch, token TTL and lane-only inputs are excluded with
  reasons.
- siteNamespaces takes the controller namespace from the settings it
  reads rather than the process environment.
- The loader refuses blank values, empty lists and extra documents.
- The image workflow checks the bad profile fails for the right reason.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* feat(e2e): cert-manager approval as a site fact in place of label exclusions

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* feat(e2e): declare what the site lane installs

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): keep lane tenant probes out of default and refuse reuse on the site lane

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* feat(e2e): keep the site and tenant kubeconfigs in the run's key dir

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): drop the temp kubeconfig from the keep log and say cluster in the PVC skip

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* docs(e2e): run the validation image against a kept site

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* feat(e2e): run the validation image from a workstation

hack/validate-site.sh runs the validation image with Docker against a
site, from a site file kept outside the repository: how to reach the
site (a kubeconfig, a Teleport kube proxy, or an SSH forward, which a
kept qualify run can fill in), the profile, the image and the two
versions. Read-only by default; --full, --only and --dry-run select
the checks. Each run keeps its reports, log and inputs, without
credentials, and prints failures and skip reasons.

The README documents it, and says read-only runs still create a
short-lived probe pod.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): wait for Docker and read tsh's local proxy in validate-site.sh

A Docker daemon waking from idle fails its first requests, which the
script took for a missing image. It now waits for the daemon and pulls
only when the image is not there, and shows any other error.

tsh v18 prints the local proxy's kubeconfig on stderr, and that
kubeconfig keeps the Teleport server and listens as proxy-url. The
script reads both streams and points a loopback proxy-url at
host.docker.internal.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* docs(e2e): run the validation Job with a profile, and tidy validate-site.sh

deploy/validate-site.yaml gains commented blocks for a profile mounted
from an nvke-validate-profile ConfigMap and for the CertificateRequest
rule NVKE_SITE_CERT_MANAGER_APPROVAL=policy needs. "Running it on a
site" says how to create the ConfigMap and when to uncomment each.

validate-site.sh counts only specs in its summary, not [AfterSuite],
runs the image on its own platform, and its header mentions the
proxy-url rewrite for tsh's local proxy.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* feat(e2e): add qualify validate and NVKE_SITE_SCOPE

- qualify validate runs the validation image against a kept Forge site
  (--run-dir), a Teleport cluster (--teleport-cluster) or a kubeconfig,
  building the image from the checkout unless --image is given. It
  replaces hack/validate-site.sh. A kept site now records its node, jump
  host and kubeconfig in node-keys/<node>.json for it to read.
- NVKE_SITE_SCOPE=namespaces holds the workload, pod, certificate, Argo CD
  and CloudNativePG checks to the site's namespaces and its components'.
  What they find elsewhere is reported, failed or not, and fails nothing.
- Check 24 reports anonymous access as not checked where a proxy turns the
  request away at TLS, as Teleport's does.
- Check 31, under approver-policy, reports issuance as not checked where no
  Ready CertificateRequestPolicy selects its Issuer, following
  approver-policy's own selection rules.
- Lint fixes in earlier files on the branch.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* docs(e2e): fix validation image tag examples and site Job notes

- Use v0.23.1 in the image build, push, run and FROM examples; a
  controller/vX.Y.Z tag publishes nothing.
- List v* release tags, without nightly betas, when keeping a site's
  image current.
- Say which tags have the Dockerfile and deploy/.
- Running it on a site: how to run without the creates checks, link
  NVKE_SITE_SCOPE and a shared site, note that older images ignore
  scope and profiles, and point to running from a workstation.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* docs(e2e): spell out what qualify validate needs from a workstation

- List the tools each mode needs, and that --image must be pulled first.
- Say which checkout the built image tests, and when to pass --image.
- Give each mode its own steps and credentials: the jump host login for
  --run-dir, tsh login and tsh kube ls for --teleport-cluster, and a
  kubeconfig without exec plugins for --kubeconfig.
- Table the inputs and where each value comes from.
- State the RBAC, the probe namespace, the controller API token, and
  what a run writes and leaves.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* docs(e2e): state what qualify validate expects of the image

- Say what an --image must keep from the Dockerfile: the mounts, the
  ENTRYPOINT report paths and the ENV switches the run relies on.
- Note that the container runs as your user and on the image's platform,
  and that no published image exists yet.
- Say the identity, not the label filter, keeps a run from changing the
  site, and use the validate-site.yaml roles rather than admin on a
  shared site.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): keep the site connection through an interrupt and skip checks that tested nothing

- qualify validate: give the site connection its own context, ended only
  after the suite exits, so the suite's cleanup still reaches the site on
  an interrupt. Start docker and tsh in their own process groups, so the
  suite gets one interrupt and Ginkgo does not skip its cleanup.
- Check 31: skip with the reason, rather than pass, when no
  CertificateRequestPolicy selects its Issuer.
- Check 24: skip, rather than pass, when a proxy refuses the anonymous
  request before the API server; binding and identity problems still fail.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): refuse run switches, fail empty runs, pin the issuerRef group and keep kube-system in scope

qualify validate refuses to start when NVKE_SITE_VALIDATE, NVKE_E2E_REQUIRE_EXPECTED_VERSION or NKE_E2E_AUTH_DISABLE is set, even to nothing, and exits non-zero when no check passed.

The cert-manager check writes the issuerRef group, from the same helper its policy pre-check matches against. A scoped site always includes kube-system and the controller's namespace. The README notes that the pre-check does not cover the RBAC use binding.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): bound the SSH handshake, pin the kept node's host key, and tighten the run summary and inputs

qualify validate:
- kills the relay when the SSH handshake takes more than a minute
- holds a kept node to the host key its record now carries, and refuses a record without one
- refuses --context outside --kubeconfig
- deletes a reused --out's old report before the run
- lists failed suite nodes in the summary

The suite records the node's host key in the kept-site record, rejects an empty validation profile, and reports a denied certificate request as not failing the check.

The README reads --controller-version from /api/version, not the image tag, and says the Job's env wins over a profile.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* feat(e2e)!: typed, versioned validation profile

Replace the flat NVKE_SITE_* profile with a validate.nvke.dev/v1alpha1
ValidationProfile, strictly decoded and described by a JSON Schema.
Retired description variables fail the run, naming their field.
NVKE_SITE_VALIDATE, _KUBERNETES_VERSION and _WORKLOAD_VERSIONS become
NVKE_MGMT_CLUSTER_*, and the site-validate label becomes
mgmt-cluster-validate.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): find the profile tests' files from their source, and drop an old name

The suite binary runs from another directory in the CAPD and NICO jobs, so the README, schema and input-coverage tests now read from the package's source directory.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(qualify): harden qualify validate and use neutral example names

- Refuse a run with no --run-dir, --teleport-cluster or --kubeconfig, rather
  than fall back to the default kubeconfig.
- Say what a run creates: without --full, only the DNS probe pod.
- Clear the last run's JSON report as well as its JUnit one.
- Write the container kubeconfig to a new owner-only file.
- Refuse a git describe tag that is not a Docker tag.
- Read only this run's part of connect.log, and keep tsh's kubeconfig in --out.
- Refuse a kubeconfig whose token comes from a file.
- Keep a kept tenant's kubeconfig at 0600 when the file already existed.
- Drop the FORGE_TELEPORT_PROXY fallback; set TELEPORT_PROXY or tsh login.
- Use nvke-controller and registry as example names in tests and docs.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): address review findings on validation profiles

Skip the profile tests that read the package's source when the binary
runs without it, as the e2e images do. Refuse duplicate API server flag
names and component keys. Run the probe namespace removal however the
teardown ends, and write a kept tenant's kubeconfig privately. Stop
tsh with an interrupt and wait for it, removing its kubeconfig. Note
the variable and label a v0.23.1 image reads.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(qualify): keep --only narrowing, fail empty runs in the suite, free the --run-dir port

- Refuse an --only that does not parse as a label expression on its own,
  so it cannot close the filter's parenthesis and select the creates specs.
- Fail a validation image run in which no spec passed, in the suite, so
  the in-cluster Job fails as qualify validate does. Dry runs are exempt.
- Forward a free local port for --run-dir, with a private copy of the kept
  kubeconfig on that port, rather than bind the node's own port locally.
- Say that apiVersion and kind are required in a profile.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): bound the probe namespace cleanup, and test writePrivateFile

- Remove the tenant's probe namespace on its own one-minute context, so
  an AfterAll timeout, which cancels the spec's, does not leave it behind.
- Test writePrivateFile on a new file and on an existing 0644 one.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): register the no-check hook before the selected JUnit report

ReportAfterSuite hooks run in registration order, each on the report as it
stood before it ran, so the JUnit report written first left out the
no-check failure.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(qualify): require a probe namespace for scoped runs, keep credentials out of --out

- Refuse a profile with managementCluster.scope: namespaces and no
  probe.namespace when the run is not in a pod, rather than create the
  probe pods in default, which the scope never named.
- Write the transit kubeconfigs to a private directory under the user's
  cache, removed when the run ends, so --out holds no credentials.
- Say in the README that the image's default runs the creates specs, the
  equivalent of qualify validate --full, and how to run it read-only.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

* fix(e2e): precheck the profile in the run's namespace, and fail a CNPG check that saw no cluster

The profile precheck passed no namespace file, so it always took the run
to be outside a pod and refused scope: namespaces without probe.namespace
even in the image. It now reads the service-account namespace file the
specs read.

With scope: namespaces and every CloudNativePG cluster outside the scope,
the database check passed having checked none. It now fails, while a site
with no database cluster still passes.

Signed-off-by: Ron Compos <rcompos@nvidia.com>

---------

Signed-off-by: Ron Compos <rcompos@nvidia.com>
2026-12-04 07:55:41 -07:00
..

release/

This directory holds release and qualification tooling: the orchestration that takes a candidate set of already-built artifacts and resolves what a qualification run would cover.

qualify plan resolves a real plan from the repository and places its plan.json, and qualify verify checks that everything the plan names is published. Each stream's leg then records its outcome with qualify result and ships it to TestGrid with qualify publish. The qualify-e2e workflow runs all four and qualifies one job per stream.

The node-image locations in registry.yaml, including the release CloudFront CDN and OCI registries, refer to private internal artifacts. They support maintainer qualification and are not a public node-image download catalog. For an installation, build the OS image and host it for your site.

Usage

qualify plan resolves what to qualify and writes it as JSON. Run it from the repository root.

registry.yaml names the artifact registry as oci://nvcr.io/${QUALIFY_E2E_NGC_ORG}, so every plan needs that variable. It is read when the file is loaded, and an unset one fails the command before anything resolves.

$ export QUALIFY_E2E_NGC_ORG=<the NGC org the artifacts are published under>

# The highest version of nvke, over every stream
$ go run ./release/cmd/qualify plan --subject nvke

# A specific tag, narrowed to the golden-path scope
$ go run ./release/cmd/qualify plan --subject nvke --version v0.22.0-beta.1 --scope golden-path

# Use a version you choose in place of what resolves
$ go run ./release/cmd/qualify plan --subject nvke --version v0.22.0-beta.1 --overrides controller=v0.21.0,kube=1.36.3

# Write the plan to a file instead of stdout
$ go run ./release/cmd/qualify plan --subject nvke --output plan.json

# Qualify a beta: describe every component at the commit the tag marks
$ go run ./release/cmd/qualify plan --subject nvke --version v0.22.0-beta.1 --resolution commitDescribe

# Check that everything the plan names is published, waiting for any still building
$ NGC_API_KEY=<an NGC key that can read that org> \
    go run ./release/cmd/qualify verify --plan plan.json --wait 90m

verify reads the registries anonymously unless it is given credentials, and both hold private repositories, so without them every OCI reference answers 401. With --wait it then retries each one for the whole budget before failing.

Variable For
NGC_API_KEY nvcr.io, with the literal username $oauthtoken
GITHUB_ACTOR, GITHUB_TOKEN ghcr.io
Flag Default Meaning
--subject required What to qualify. nvke is NVKE as a whole
--version the highest version The subject's version, which must be an existing tag
--overrides none Values to use in place of what resolves, as name=value pairs separated by commas
--scope full How much of the matrix to cover, a scope from policy.yaml
--output - Where to write the plan. - is stdout
--resolution commitDescribe How to resolve the components, named for the strategy that answers. commitDescribe describes each at the commit the subject's version points at, which on a tagged commit is that tag, so every component resolves to the version being qualified. It is how a release, an RC and a beta are all qualified; an RC resolves to the beta it was cut from, whose artifacts it ships. Once the commit also carries a release tag, describe names the release, so a later qualification of its beta or RC resolves the release's artifacts, built from the same commit; check the resolved versions in the plan. gitTag takes the highest v* tag in the repository, which is not necessarily the version being qualified
--check-exists off Ask for each location this resolves and require it to be published. Off leaves the question to qualify verify
--root the enclosing checkout The tree the version resolvers read: git tags and history, and files such as make/tool-versions.mk
--subject-spec release/qualification.yaml for nvke, <root>/<subject>/qualification.yaml otherwise The subject's qualification spec. Name it to plan a subject kept apart from the tree --root points at
--policy, --registry the files under release/ Where to read the release policy and the registry from

Without --version the subject resolves the way every component does, to the highest version of any kind. Pass --version to name a tag that exists.

A value given with --overrides replaces what that component or dependency would have resolved to, and is checked the way a resolved one is: a tag has to exist, and a Kubernetes or OVN version has to be one the image locks. An image or a bootloader such as os-image-amd64 is a dependency whose override is a URL, so it is overridden by name too. The names that were overridden are listed under overrides in the plan.

A source's base can name a ${VARIABLE}, which is substituted from the environment when the file is read. The registry under which artifacts sit names one organization's account rather than anything about NVKE, so the file states the shape and a run supplies the value. An unset or empty variable fails on the file that asked for it, with every missing name at once, rather than producing a plan that names an artifact under no org.

Planning reaches nothing but git. Whether each artifact is published is asked once, by qualify verify, for everything the plan names. --check-exists asks during resolution instead, which needs a network that can reach the bucket: it is private, so a missing artifact and a network that is not allowed both answer 403, and the check can confirm that an artifact exists but not that it does not.

Every component is versioned by the repository's vX.Y.Z tags, so a qualification uses --resolution commitDescribe: it describes each component at the commit the version being qualified marks, which on that commit is the version itself. That holds for a release and a beta. An RC publishes nothing and is a lightweight tag on its beta's commit, so there describe names the beta and an RC resolves to the beta's artifacts, which are the RC's. The commit is derived from the version being qualified rather than given. The plan looks like this:

$ go run ./release/cmd/qualify plan --subject nvke --version v0.21.0 --scope full
{
  "subject": "nvke",
  "version": "v0.21.0",
  "scope": "full",
  "combinations": [
    {
      "id": "capi-provisioned-v0.21.0_cli-v0.21.0_controller-v0.21.0_os-image-v0.21.0",
      "components": [
        { "name": "controller",       "version": "v0.21.0", "url": "oci://nvcr.io/<org>/nvke-controller:v0.21.0", "versionStrategy": "commitDescribe", "locationStrategy": "ociArtifact" },
        { "name": "cli",              "version": "v0.21.0", "versionStrategy": "commitDescribe" },
        { "name": "os-image",         "version": "v0.21.0", "versionStrategy": "commitDescribe" },
        { "name": "capi-provisioned", "version": "v0.21.0", "url": "oci://nvcr.io/<org>/cluster-api-provider-provisioned:v0.21.0", "versionStrategy": "commitDescribe", "locationStrategy": "ociArtifact" }
      ],
      "dependencies": [
        { "name": "cni-ovn",               "version": "2.4.2", "versionStrategy": "lockedPackage" },
        { "name": "os-image-bootloader-amd64", "url": "https://cdn.example/nke-isos/qcow/efi/x86_64/qcow-imager.efi", "locationStrategy": "url" },
        { "name": "os-image-bootloader-arm64", "url": "https://cdn.example/nke-isos/qcow/efi/aarch64/qcow-imager.efi", "locationStrategy": "url" },
        { "name": "cli-amd64",                 "version": "v0.21.0", "url": "oci://nvcr.io/<org>/nvkectl:v0.21.0-linux-amd64", "locationStrategy": "ociArtifact" },
        { "name": "cli-arm64",                 "version": "v0.21.0", "url": "oci://nvcr.io/<org>/nvkectl:v0.21.0-linux-arm64", "locationStrategy": "ociArtifact" },
        { "name": "kind",                      "version": "v0.32.0", "versionStrategy": "makeVar" },
        { "name": "clusterctl",                "version": "v1.12.3", "versionStrategy": "makeVar" },
        { "name": "nerdctl",                   "version": "2.3.5", "versionStrategy": "makeVar" }
      ],
      "streams": [
        {
          "name": "forge-gb200-amd64-ubuntu-24.04-kube-1.36",
          "capabilities": { "arch": "amd64", "gpu": "gb200", "kube": "1.36", "provider": "forge", "ubuntu": "24.04" },
          "dependencies": [
            { "name": "kube",           "version": "1.36.3", "versionStrategy": "lockedPackage" },
            { "name": "os-image-amd64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/amd64/nvke-node-non-fde-ubuntu-24.04.5-amd64.qcow2", "locationStrategy": "osImage" },
            { "name": "os-image-arm64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/arm64/nvke-node-non-fde-ubuntu-24.04.5-arm64.qcow2", "locationStrategy": "osImage" }
          ]
        },
        {
          "name": "forge-gb200-arm64-ubuntu-24.04-kube-1.36",
          "capabilities": { "arch": "arm64", "gpu": "gb200", "kube": "1.36", "provider": "forge", "ubuntu": "24.04" },
          "dependencies": [
            { "name": "kube",           "version": "1.36.3", "versionStrategy": "lockedPackage" },
            { "name": "os-image-amd64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/amd64/nvke-node-non-fde-ubuntu-24.04.5-amd64.qcow2", "locationStrategy": "osImage" },
            { "name": "os-image-arm64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/arm64/nvke-node-non-fde-ubuntu-24.04.5-arm64.qcow2", "locationStrategy": "osImage" }
          ]
        },
        {
          "name": "forge-gb200-amd64-ubuntu-26.04-kube-1.36",
          "capabilities": { "arch": "amd64", "gpu": "gb200", "kube": "1.36", "provider": "forge", "ubuntu": "26.04" },
          "dependencies": [
            { "name": "kube",           "version": "1.36.3", "versionStrategy": "lockedPackage" },
            { "name": "os-image-amd64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/amd64/nvke-node-non-fde-ubuntu-26.04.1-amd64.qcow2", "locationStrategy": "osImage" },
            { "name": "os-image-arm64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/arm64/nvke-node-non-fde-ubuntu-26.04.1-arm64.qcow2", "locationStrategy": "osImage" }
          ]
        },
        {
          "name": "forge-gb200-arm64-ubuntu-26.04-kube-1.36",
          "capabilities": { "arch": "arm64", "gpu": "gb200", "kube": "1.36", "provider": "forge", "ubuntu": "26.04" },
          "dependencies": [
            { "name": "kube",           "version": "1.36.3", "versionStrategy": "lockedPackage" },
            { "name": "os-image-amd64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/amd64/nvke-node-non-fde-ubuntu-26.04.1-amd64.qcow2", "locationStrategy": "osImage" },
            { "name": "os-image-arm64", "version": "v0.1.0", "url": "https://cdn.example/nvke-packages/os-image/releases/v0.1.0/arm64/nvke-node-non-fde-ubuntu-26.04.1-arm64.qcow2", "locationStrategy": "osImage" }
          ]
        }
      ]
    }
  ]
}

How the plan is used

plan.json is the input to a qualification run. In the qualify-e2e workflow:

  • The plan job runs qualify plan --subject nvke. The dispatch inputs and QUALIFY_E2E_* repository variables that name a version are passed as --overrides, so the plan records them and a job never has to guess which of the two it was handed. --resolution is commitDescribe unless gitTag is selected by input or by QUALIFY_E2E_RESOLUTION, and a beta tag push takes commitDescribe whatever the variable says. The plan is uploaded as an artifact.
  • qualify-run runs once for each stream of each combination, gated behind a GitHub environment from its first step. It runs qualify verify on that plan before any machine is taken, so an artifact that was never published fails there rather than an hour into a run -- waiting when the plan resolved at a commit, because the publishers may still be running -- then resolves versions and capabilities and builds the site inputs. Its versions, architecture and GPU model are that stream's entry in the plan, so every stream qualifies exactly what the plan resolved. Each job is named by its stream.
  • After the suite runs (or fails to), qualify result writes qualify-result.json from that stream's plan entry and its Ginkgo report, on every non-dry-run leg -- including a PR leg and an infrastructure failure, so the record exists even when nothing gets published. qualify publish then ships it, with the JUnit report, to TestGrid -- but only on a trusted ref (main, or a release/beta tag), since that is the only identity the testgrid repo's WIF provider will exchange a token for. A labelled PR leg gets a result record as a workflow artifact and nothing on TestGrid.

The plan carries what a job needs, the versions to test and the capabilities of the stream to run on. The e2e suite requires every version a Forge run uses (controller, capi-provisioned, kube, cni-ovn, kind, clusterctl, nerdctl and the image and bootloader URLs) and fails before a machine exists when one is missing. It carries no default for them, so the plan is the one place the versions come from.

What this is not

build/ produces the artifacts for one component. release/ never builds anything. It consumes artifacts that already exist, and it is an error for anything under this directory to compile source into a shipped artifact. That separation is what makes the qualification meaningful: a release promotes the exact bytes that were tested, and tooling that can rebuild is tooling that can substitute.

Publication stays in the workflows. A vX.Y.Z or vX.Y.Z-beta.N tag drives them as docs/artifact-publication.md describes. release/ orchestrates over those publications; it does not replace them.

Layout

Path Contents
registry.yaml How each component resolves to a version, and the named locations artifacts are published under. It holds the rule that finds a version, never a version
policy.yaml The streams that exist and the scopes over them
qualification.yaml What is qualified when NVKE is qualified as a whole: the components tested together, and the other versions a run needs
cmd/qualify/ The binary. plan resolves what to qualify, verify checks that it is published
pkg/qualification/ Reading and checking the three files, and turning them into a plan. Importable from other modules
pkg/resolve/ The resolution strategies, which a caller can add to. Of this repository it takes only internal/artifact
internal/artifact/ Asking whether a location holds something, over HTTPS or a registry, and waiting for one that is still publishing
hack/next-tag.sh The version the next beta or release candidate tag gets, from the commits since the latest GA tag. test_next_tag.py tests it against fixture repositories

Each file has one concern. A component that is qualified on its own would carry its own <component>/qualification.yaml next to its code, using the same schema, and share the registry and the policy.

Subjects, components and dependencies

qualification.yaml says what a qualification covers. It is written for a subject, the thing being qualified, and the subject's version is the plan's version. This file is for nvke, which stands for NVKE as a whole, so its version is a beta tag on main. A component qualified on its own would have a file of the same shape next to its code.

The file lists two kinds of thing.

components are the parts of NVKE tested together: controller, cli, os-image and capi-provisioned. Each carries selectors that say which version to take, and today the only selector is latest, the highest version of any kind ordered by semver, so v0.1.1 beats v0.1.1-rc.8 and v0.1.1-rc.1 beats v0.1.0. One choice of versions for all four is a combination, which is what a plan is organised by.

dependencies are the other versions a run needs: Kubernetes, the OVN CNI, the tools, the nvkectl artifact for each architecture, and the node image and its bootloader for every architecture, whatever the stream's own. Each image or bootloader is named by the key the e2e suite reads. They have no selectors, because the components determine them or a pin file does. A dependency says what to resolve with four fields, each with one meaning:

Field Meaning
constraint A literal version constraint, such as "1.4". Naming every part pins one version, so "1.4.11" matches that and nothing else
constraintFrom The constraint is the stream's value of a capability, {capability: kube}
releases The versions to choose from, for a strategy that cannot list them itself. An image's Ubuntu point releases are one. The highest the constraint matches is used, so series 24.04 picks 24.04.5
value A declared answer that nothing derives, such as a bootloader's path

A dependency with no constraintFrom is resolved once for the combination. One with a constraintFrom is resolved once per stream, with that stream's value. Which of the two it is comes from that field and nothing else. So the images are per stream and the bootloaders are per combination.

A resolved entry in the plan has a version, a url, or both, and the strategy that answered each. A version is always a version and a url is always a location. An image carries the os-image release it was built from and the URL of the qcow, a bootloader carries only its URL, and a component published to a registry carries the reference to pull.

versionStrategy is the registry's name for what resolved the version, or which arm answered where one entry can resolve two ways. An entry that takes another entry's version has none, because no strategy answered. locationStrategy is the registry's name for what built the URL.

Quote a version in the file. YAML reads an unquoted 1.40 as a number and the constraint becomes 1.4.

The two questions an entry answers

registry.yaml gives each entry a resolve with two keys, because what a version is and where it is published are separate questions.

- name: controller
  resolve:
    version:  {strategy: gitTagOrCommitDescribe, with: {tagPrefix: ""}}
    location: {strategy: ociArtifact, with: {source: artifact-registry, repository: nvke-controller}}

A version block answers with a strategy of its own or takes one from another entry, and the two are mutually exclusive. A location block is optional and always names a strategy. An entry may declare either half alone: a bootloader is a location with no version, and a tool pin is a version with no location this names.

A version can be taken only from a component. Components resolve first and each is offered to every dependency, which a dependency's own result is not.

An override names what a strategy would have produced, so it goes to the half that has one, and to the version half when both do. --overrides controller=v0.21.0 names a version and --overrides os-image-amd64=<url> names a location, without either declaring which it is.

Component Version Location
nvke, cli, os-image Git tags, under each component's tag prefix none this names
controller, capi-provisioned the same <artifact-registry>/<repository>:<version>
kube, cni-ovn The lock files the image's packages commit, read at the os-image tag the combination resolved. A node installs these from the image's own apt repository, so the lock files are the versions it can offer none
os-image-amd64, os-image-arm64 taken from os-image Built from that release, the architecture and the Ubuntu point release the stream's series picks from releases
cli-amd64, cli-arm64 taken from cli <artifact-registry>/nvkectl:<version>-linux-<arch>. nvkectl is published as one tag per platform with no index above them, so the cli version alone names none of them
os-image-bootloader-amd64, os-image-bootloader-arm64 none, a declared path has no version behind it A path declared in qualification.yaml under the artifact-cdn source, because nothing derives it
kind, clusterctl, nerdctl make/tool-versions.mk, which owns every tool pin none

The resolvers know none of this vocabulary. They receive plain values and return plain values, and the planner is the only code that knows where those came from.

Streams, scopes and combinations

Three words carry the whole matrix, and they are worth keeping straight.

A stream is one configuration, named by the capabilities it provides -- {provider: forge, gpu: gb200, arch: amd64, ubuntu: "24.04", kube: "1.36"} -- and never by the infrastructure that satisfies them. Which runner, site or subnet a capability resolves to is an environment knob belonging to the e2e suite's own config. That boundary is what keeps the suite runnable by hand and by a second organisation, and keeps this tool from becoming a config translator. arch is the architecture of the site and control-plane node, so it does not say which node images a run needs.

A scope is a named selection over the streams, matched on capabilities. full selects every Forge stream, golden-path narrows to Ubuntu 24.04 on GB200, l40s to Ubuntu 24.04 on L40S at site-1, dsx to the DSX datahall stream, and perf to the performance stream on the NVKE Scale site. A scope can also leave streams out with exclude, which is how full skips the perf stream. policy.yaml says why each is drawn where it is. The set of supported Kubernetes minors is not declared anywhere, it is whichever minors have streams, so adding one means adding streams and nothing else.

A stream can also carry parameters: the settings of its run, which are the environment file it runs against, the workers its tenant gets, the monitoring nodes it gets beside them (monitoringWorkers), the control-plane nodes its tenant gets (tenantControlPlaneNodes, which only Forge applies), the suite's timeout in minutes, the TestGrid group it publishes to in place of the subject's (testGridGroup) and the kaps-bench run specs the suite runs on the tenant once its checks pass (kapsBenchRunSpecs). They configure the run and nothing selects on them, which is why they are not capabilities. Only those fields are accepted, so a misspelled one is an error. The plan copies them for each stream and the stream's result records them.

A combination is one resolved set of components, qualified against every stream in the scope. Its id is the components' <name>-<version> pairs sorted by name and joined with _, with characters unsafe in a path replaced by -, so the id in a plan and the id in a published record are the same string without a lookup. Today every component carries the single selector latest, so there is exactly one combination.

Each stream in a combination carries its capabilities rather than just the name, so the run that executes it is configured from the plan. Reading them back out of the policy at run time would let an edit landing between the plan job and the last stream change what that stream runs, which is what resolving once is for.