Commit Graph
5 Commits
Author SHA1 Message Date
Miancheng Lin 3317737e1e refactor(api): rename the OS profile surface to releases (#1612)
* refactor(api): rename the OS profile surface to releases

/osProfiles becomes /releases and nico.osProfile becomes nico.release, so
the REST API uses the release vocabulary the rest of the management plane
already does. Internal db and workflow structs keep their field names.

Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>

* refactor(controller): rename the OS profile to the release

Nico payloads gain a release key. os_profile is still written alongside
it and still read as a fallback, so a CWE predating the rename keeps
reading and writing the value through a rolling upgrade or a rollback.
No stored data changes. A later release backfills release from
os_profile, then drops the mirror and the fallback.

The os_profile Prometheus label is deliberately unchanged.

Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>

* docs: follow the OS profile rename

The request YAML in the workload-cluster guides named a field the API no
longer accepts, and two troubleshooting entries quoted error text that no
longer appears. The dashboard panel descriptions in operate/observe.md
keep the old wording: the panels and the os_profile metric label they
read are unchanged.

Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>

* fix(scripts): read cluster NICo fields from .nico and allow an absent configProfile

The cluster-level orgID, siteID and vpcID live under .nico in the API
response, as the node pool fields already corrected do, so the script
exited before generating anything. configProfile is optional in the same
schema, and requiring it skipped a valid node pool.

Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>

---------

Signed-off-by: Miancheng Lin <mianchengl@nvidia.com>
2026-10-15 11:56:35 -07:00
Alexander Greene 92a3039bae feat: default CNI to ovn-kubernetes (#1303)
* feat: default omitted CNI to ovn-kubernetes

Empty cniPlugin and cniName now select ovn-kubernetes, and local images, examples, and create scripts follow that default. calico remains an explicit override.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: build OVN packages outside the gitignored bin directory

crane was installed into the package tree's bin directory, which a checkout sync can delete while the download is still running. Stage the tool in the build scratch directory and create its destination immediately before moving it.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): complete pod checksums on the userspace datapath

veth pods send partial checksums, and the netdev datapath forwarded them unfinished, so receivers dropped pod traffic to services and the node. Enable userspace TSO and restart ovs-vswitchd only when the setting changes.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(tilt): label the local NICo cluster button inputs

The create dialog showed the defaults with no captions because text_input was called without label.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* feat(controller): ensure host vTPM proxy for nico-containers on Linux

Share ensure-vtpm-proxy.sh between Colima and bare Linux hosts, fail fast
from Tilt and nico-sim when /dev/vtpmx is missing, and document the one-time
host prep so remote Tilt targets do not hang waiting for kubeconfig secrets.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: load the vTPM proxy on the kernel that runs Docker

Container nodes need /dev/vtpmx. Without it, swtpm never starts and nke-agent blocks while setting up SPIFFE, so provisioning looks stuck. Colima already loaded the module inside its VM, but a Linux host never did. One script now does that load, and make host-up runs it on either machine.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): keep an explicit OVN version when the plugin name is omitted

Kubeadm init with no plugin name defaults to OVN, but a version sent with that request was discarded and 1.4.0 was installed instead. The requested version is used, and 1.4.0 is applied only when none was given.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): retry userspace TSO after a failed ovs-vswitchd restart

ovs-vswitchd reads userspace-tso-enable only at startup. A failed restart left the setting enabled, so the next attempt treated it as already applied and never restarted the daemon. The previous value is restored on failure so the restart is tried again.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): install the CNI image package selected for a Forge sample cluster

The Forge sample accepts CNI_PLUGIN=calico, but both node pools always installed the OVN image package. The pre-kubeadm commands now install the Calico images for Calico and the OVN images for OVN.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: rebuild CAPD OVN assets when any package is missing

capd-image skipped preparing OVN assets when the charts package was present and newer than the script, even if the images or Helm package was gone. It now rebuilds when any of those packages is missing, and still rebuilds when the prepare script is newer than the charts package.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): fail the nico-vms sample create on HTTP errors

The create request returned success on a 400 or 401 because curl exits 0 unless --fail is set, and --fail hides the body. The response stays visible, and the script now exits from the HTTP status.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): check the vTPM device in the configured Colima profile

The macOS check ran colima ssh without a profile, so a non-default COLIMA_PROFILE could be reported missing or present against the wrong VM. The device checks now use the same profile colima-start.sh prepares.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: default each CAPD OVN package path on its own

Setting CAPD_CNI_CHARTS_DEB_PATH skipped the images and Helm packages, so the node image was built without them. Each path is filled in when it is unset, and each one is checked before the image build.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): run container nodes on the kernel Open vSwitch datapath

Userspace Open vSwitch encapsulates Geneve but has no port that can emit it, so traffic between container nodes is dropped. Container nodes now load the host kernel module and keep the dummy gateway bridge.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: drop the duplicate /lib/modules mount from CAPD nodes

Kind already bind-mounts the host module tree read-only, so listing it again in extraMounts makes Docker reject the node container.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(cli): load the vTPM proxy without sudo when already root

The arm64 bootstrap runner executes the job as root, and its sudoers file rejects sudo from root, so the e2e died after the fake nodes were ready.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: rebuild the CAPD Helm package when the OVN asset script changes

The Helm freshness check compared prepare-ovn-assets.sh with the charts package, so a newer script could leave a stale nke-e2e-helm.deb in place.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): create the sample CAPD cluster through controlPlaneConfig

The local controller rejects control-plane node pools, so the sample script's node pool was rejected before a cluster was stored.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: build the CAPD bundle mirror for the Docker daemon's architecture

The legacy bundle path defaulted to amd64 OVN packages, so an arm64 daemon was served image debs it cannot install.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): reject an unknown CNI plugin instead of installing OVN

The empty-plugin default already lives in the kubeadm init helper. The installer was also rewriting a typo to ovn and mutating the request.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: rebuild the CAPD OVN images package when the asset script changes

The images freshness check compared prepare-ovn-assets.sh with the charts package, so a newer script could leave a stale images deb in place.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(api): waive omitting cniPlugin on cluster create

An omitted plugin selects ovn-kubernetes. Clients built against the published spec were required to send the field, so the compatibility gate needs a named waiver.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): target the configured Colima profile for VM setup

SSH, stop, and the failure hints used Colima's default VM, so a non-default profile never received the vTPM module or the Docker limits.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* docs(agent): note that bare metal also uses the kernel datapath

The container check keys off NKE_OVS_DATAPATH_TYPE. An unset variable keeps bare metal and VM nodes off the dummy-bridge path even though they run the kernel datapath.

Signed-off-by: Alex Greene <algreene@nvidia.com>

---------

Signed-off-by: Alex Greene <algreene@nvidia.com>
2026-10-08 16:45:49 -04:00
Ron Compos 59fbffc8bb feat(e2e): run the Forge site controller lane in GitHub Actions (#1152)
* feat(e2e): add the nico-forge tenant backend

The suite has three backends and all of them are simulators. This adds a
fourth that runs on real Forge infrastructure, so a qualification run can
create a tenant cluster the way a customer does.

It builds the same CAPI manifests nico-containers builds. CAPNico reconciles
both, so buildNicoRequest is now a thin caller of a shared builder and the two
backends differ in what they name rather than in how they ask. The manifests
follow hack/create-forge-nico-cluster.sh, the one path known to have created a
cluster on this site, which is also where the identifiers come from.

Two payloads are the real difference. A container reaches kubeadm whatever its
iPXE script says and needs no packages, so both were hardcoded stubs; a Forge
instance boots the script it is given and comes up with only what it was told
to install. Both are now templates, and both name component versions, which is
why a nico-forge run has to be told what it is qualifying.

Three flags carry that. -e2e.environment names infrastructure that exists and
has no default, since a site and a VPC cannot be inferred. -e2e.versions pins
what is under test. -e2e.capabilities says what the run needs, and the
environment's instance types answer it, so the machine is chosen by what the
run requires rather than pinned in the table. Capability matching does not
fall back: a site with no GB200 fails a GB200 request instead of running it on
an L40 and calling that qualified.

No control-plane VIP. CWE reads an empty one as "do not configure kube-vip",
which is what the working Forge script relies on, so initCluster now skips the
VIP search for a backend that declares no preference. The simulator backends
advertise theirs over a BGP speaker the runner hosts and are unchanged.

The entry is opt-in behind the nico-forge label and provisioning-only. Create,
node readiness and delete are what a first run on hardware has to get through
before a deeper assertion is worth attempting, and unlike every entry above it
this one spends real money.

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

* docs(e2e): say what a Forge SSH key group actually governs

forge.yaml and the Site field said nothing about what sshKeyGroupID does, and
the obvious reading is the wrong one: SADD 3.5.3 passes the same field to
CreateInstance beside a wait-for-SSH step, which invites reading it as access.

A key group governs Serial-over-LAN console access, not the OS account's
authorized_keys, so attaching one grants no shell on a node. That comes from
the account baked into the image, or from an authorized_keys written by
cloud-init. Nothing here logs into a tenant node; the field is carried for
parity with what a Forge node normally gets.

Comments only. Carried over from the retired feat/e2e-forge-tenant branch,
which is the one thing on it not superseded by this one.

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

* fix(e2e): point nico-forge at the Forge site that has actually worked

The environment file named a site taken from create-forge-nico-cluster.sh,
whose defaults arrived with the original cloud-workflow-engine import and have
never changed. Nothing records a cluster ever being created there; the only
evidence it exists is a comment preserving one instance-type list. Two
recorded provisioning exercises used az61 in Forge-Tenant-RelEng instead, and
between them built a site controller and three tenant clusters that all
reached CoreDNS Ready. The file now carries az61's site, VPC, subnet and key
group, and the two instance types that have each carried a tenant. This also
means the site key is a real name rather than "default", and that az61 has no
GB200 while ytl does.

The same exercises caught two omissions in the pre-kubeadm payload. It
installed nke-cni-ovn-images but not nke-cni-ovn-charts, which the agent
requires to be present already and never installs itself, and it never
installed openvswitch-switch, which OVN needs on the host before the agent
will run helm. Either one fails InstallCNI, and that failure terminates the
provisioning workflow rather than retrying, so the node has to be reset and
the run repeated. The payload now installs all three and the test asserts each
by name.

Two smaller things. The Kubernetes default was the container simulator's
1.34.2, which decided which nke-kubeadm-distro package the payload asked for;
it is now 1.36.3, beside the existing CNI and SPIRE defaults, matching what
az61 ran. And the table entry carried a "happy-path" label alongside
"nico-forge", which put it inside test-e2e-happy-path -- a target whose own
help text says CAPD and NICo VMs, and which a developer runs expecting a
simulator rather than real hardware.

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

* feat(e2e): provision a site controller node on Forge

Add the SADD 3.5.3 contract (internal/infra) and its Forge
implementation on the vendored ncx-infra-controller-rest SDK.

ProvisionNode matches an instance type from the site's declared
capabilities, reads the tenant from GET /tenant/current, and creates the
instance with phone-home disabled, since new instances cannot reach the
metadata endpoint. It polls by id until Ready, dials through the site's
jump host until the node answers, and holds until cloud-init reports
done. Any failure after create deletes the instance on a detached
context, and Session.Teardown deletes it too.

The bootstrap node's cloud-init is marshaled rather than templated. It
authorizes a per-run ed25519 key, starts the bundled containerd, and
installs nerdctl-full, kind and clusterctl at the repository's pins,
plus the IPv4-only kind network.

The jump-host transport is an interface; its implementation follows.
Also add jumpHost to the Forge environment schema (SADD 3.5.2) and let
callers set the node agent's arguments, so --disable-mtls can agree with
the bootstrap flags.

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

* feat(e2e): reach Forge nodes through the site jump host

Add internal/infra/teleport. tsh ssh to the site's jump host runs a
byte relay to the node's sshd (nc, or bash /dev/tcp where nc is
absent), and the runner negotiates SSH with the node itself using the
per-run key. The jump host holds no credential for the node, and
forwards ride the node's own sshd rather than Teleport port forwarding.

The first host key a node presents is pinned per address and client
key. Run returns combined output and kills the command on cancel; Put
and Fetch act as root through sudo, Put writing beside the target and
renaming.

The Forge provider takes the transport through a Teleport adapter, and
Target moves to the teleport package.

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

* feat(e2e): bootstrap and deploy a site controller on a provisioned node

Add internal/site, which turns a provisioned machine into a site
controller over the provider's session:

- Bootstrap stages nkectl, a checkout subset and image archives onto the
  node, generates the site spec, runs nkectl bootstrap site as root,
  hands off to a Deployer, forwards the API server, and waits for CWE to
  report healthy at the expected version. The forwarded kubeconfig keeps
  the node address as tls-server-name, since the API server certificate
  does not cover loopback.
- SBOM is a Deployer for the nke-sbom deploy path: untaint, clusterctl
  init and a default StorageClass before, apply-capi-spiffe-exec-auth.sh
  after, and the per-site values and BootstrapConfig rendered in Go.
  Credentials go into root-only files on the node, removed afterward.
- SweepTenants deletes every tenant through CWE before the site is
  released.
- ExportRef stages the deploy path from a pinned commit while it exists
  only on its pull request (#812).

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

* feat(e2e): build a site controller on Forge and run a tenant against it

Add the site lane (label site-controller). -e2e.site-stage picks how far
it goes: provision a Forge node through the site's jump host, bootstrap
the site controller with nkectl, or also deploy the SBOM stack and run
the nico-forge tenant specs against the site it built. The node is torn
down afterwards, tenants first, unless -e2e.keep-site or
preserveOnFailure keeps it. Without a stage the lane is skipped.

The tenant specs now take the management cluster from a resolver, so
the same subtree runs against the configured kube context or a site the
suite built. The existing spec tree is unchanged.

Site inputs are identifiers in the suite config (site:); secrets come
only from FORGE_API_KEY, GHCR_USERNAME and GHCR_TOKEN. The jump host is
configured per run and the Teleport proxy is left to tsh, so neither is
checked in. `make site-inputs` builds nkectl and the image archives the
lane stages, outside the clone.

Also check the SBOM deployer's values against the pinned deploy path's
charts offline, and clear the goconst and unparam findings in
internal/site and internal/infra/teleport.

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

* feat(e2e): run the Forge site controller lane in CI, over a password jump host

Adds the workflow that drives the site controller lane on real Forge
hardware, and an interim way to reach the jump host until it is enrolled
in Teleport.

SSHJumpHost logs into the jump host with a password and asks its sshd to
forward, replacing only teleport.Dialer's relay: the session to the
machine beyond it is still negotiated on the runner with the ed25519 key
the run generates, so no node ever sees a password. The route is
selected by JUMP_HOST_PASSWORD being set, which makes enrolling the jump
host later a matter of dropping the secret.

The host key is pinned by SHA256 fingerprint when site.jumpHostKey-
Fingerprint is set, and accepted with a warning on every dial when it is
not -- unpinned means the password is offered to whatever answers.

The workflow is workflow_dispatch only, serialised repository-wide and
never cancelled: a run holds a bare-metal instance for an hour and
teardown is the suite's, so a killed runner leaks hardware.

* ci(e2e): probe the Forge lane's network path from an ARC runner

Three things the site controller lane depends on have never been tested
from an ARC runner: reaching the Forge API, reaching the Teleport proxy,
and reaching the jump host's sshd. The last one also decides whether the
interim password route is possible at all, since the documented
procedure only ever reaches that host through tsh.

Reports rather than fails, because a red result is the finding. Takes no
secrets. Prints the jump host's SHA256 host key, which is the value
site.jumpHostKeyFingerprint wants, and asks sshd which authentication
methods it accepts without offering one.

Carries a scaffolding push trigger: workflow_dispatch reads its trigger
from the default branch, and the probe exists to answer these questions
before anything merges.

* ci(e2e): re-run the Forge connectivity probe with the jump host and proxy set

* ci(e2e): probe on every push to the branch, not only on its own edits

* test(e2e): probe the Teleport route end to end, not just the proxy

* fix(ci): install tbot, which teleport-actions/auth shells out to

* ci(e2e): default the Forge site lane to Teleport, and record what the probe measured

* ci(e2e): drop the dead password route and let a labelled PR run the lane

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

* test(e2e): probe the OS image URLs the node boots from

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

* test(e2e): prove tbot daemon renewal against nv-prd-dgxc

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

* ci(e2e): renew the Teleport identity with a tbot daemon instead of one 2h cert

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

* ci(e2e): pull from GHCR with the job token, as every other workflow does

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

* chore(e2e): drop the #812 fetch now that the deploy path is on main

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

* fix(e2e): pin a node's host key only after a handshake succeeds

waitReachable polls a Forge node for 20 minutes while it is being imaged,
and several different sshds answer on its address in that window: whatever
is left on a recycled address, the imager, then the installed OS. The pin
recorded the first host key any of them presented, from the callback, which
runs before authentication -- so the first connection to fail auth still
pinned a key, and every attempt after the real image booted was refused for
the rest of the run. Run 35953715491 spent its whole 20 minutes that way.

Commit the pin from Dial instead, after ssh.NewClientConn returns cleanly.
That keeps what the pin is for, refusing a substitution mid-run, and adds a
property it did not have: the key is generated per run and placed by
cloud-init, so a completed handshake is evidence the machine that ran this
run's cloud-init answered, not a leftover OS at the same address.

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

* fix(e2e): stage the deploy path from the commit under test

DeployPathRef was the head commit of pull request 812, staged that way
while the nke-sbom deploy path existed only there. 812 was squash-merged,
so that commit is on no branch, and the previous commit removed the
refs/pull/812/head fetch that used to put it in the runner's clone. Both
the bootstrap and full stages call ExportRef, so the next run of either
would have failed in seconds on a fresh checkout.

HEAD is what the comment always said this should become. On a pull_request
run that is the merge commit, which is the deploy path under test; config's
deployPathRef still overrides it to stage an older one against a newer
suite.

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

* fix(e2e): build the site lane's CWE from the checkout, not a published tag

nkectl is built from the checkout and is a client of the CWE it
bootstraps, so the two have to come from one commit. A published tag cannot
give that today: GHCR carries release tags only and its newest, v0.1.1-rc.8,
is 43 commits before #850, which removed infra.spireAttestationMethod from
the cluster API. Run 35999250795 got through the kind cluster, postgres,
Temporal, SPIRE, CAPI and a healthy CWE before failing on the first API call
with 400 Bad Request: infra.spireAttestationMethod is required.
controller/deploy/nke-sbom/controller/overlay.yaml had already hit this and
pinned an NVCR per-commit tag to get around it.

site-inputs now builds the image with controller's docker-build-local, which
is vendored and needs no credential, and the workflow tags it with the commit
under test. One value feeds the archive staged onto the node, the
NKECTL_CWE_IMAGE the bootstrap runs, and the tag the SBOM deploys, so the
bootstrap CWE and the site controller are the same binary.

Not git describe for the tag: a CI checkout is shallow and carries no tags,
so it would report v0.0.0 and stop being unique. Naming controller-version
still pulls that published tag, for qualifying a release past #850.

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

* fix(e2e): give the controller image build a GIT_VERSION under GitHub Actions

The controller Makefile takes GIT_VERSION from CI_COMMIT_SHA whenever CI is
set. That is GitLab's variable. Under GitHub Actions CI is set and
CI_COMMIT_SHA is not, so GIT_VERSION was empty and docker-build-local died
on one of its own tags:

  ERROR: failed to build: invalid tag "nvcr.io/j7sbcjl3qgta/nke-controller:"

image-nvcr.yml already passes GITHUB_SHA for this; site-inputs now passes the
commit it builds from, which also stamps the binary correctly.

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

* fix(e2e): bootstrap the site without mTLS, and keep the node's diagnostics

Run 36016817952 created the site cluster and then watched it sit in
Provisioning for the full thirty minutes with no error. Two lines say why:
SPIRE installed with tpmThumbprints=0, and the node reported an empty
tpmEkThumbprint. That is the production SPIRE path without the one input it
needs -- with no thumbprint nkectl deploys no TPM attestor at all, so the
node agent can never attest and CWE can never drive kubeadm on it.

The procedure that has actually built a site on az61 takes the other path on
both sides, --disable-mtls in the agent's arguments and on the bootstrap.
site.disableMTLS now decides both, in one place, because a mismatch between
them surfaces as an opaque TLS handshake error. SPIRE and TPM are still
exercised: the deploy path turns them on, which is the full stage.

That run also lost everything nkectl collected. It writes cluster
diagnostics on the node, the node is released minutes later, and nothing
copied them off -- 48 minutes of hardware and no evidence from the cluster
side. CollectDiagnostics tars them and the spec pulls them into the run
artifact on failure, best effort, on a detached context so a spec that timed
out can still use it.

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

* ci(e2e): keep the site lane's log when the run is green

go test buffers a passing package's stdout and discards it, so run
36033032946 -- the first bootstrap to succeed on Forge hardware -- uploaded
a 1.7 KB artifact with no Ginkgo output in it. The upload step describes a
green run as the reference for diagnosing the next red one, which needs the
run to have been kept.

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

* test(e2e): collect the node's diagnostics when a tenant fails too

Only the bootstrap spec collected them, which was enough while the lane
stopped at bootstrap. The full stage runs tenants against the site it
built, and a tenant that never reaches Ready is a failure of that site's
control plane -- whose evidence leaves with the node that teardown
releases moments later.

Collection is idempotent, so the bootstrap archive still wins when both
paths run: it was written closest to the failure.

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

* ci(release): record what each publisher published, by digest

Precondition for assembling a release candidate: every artifact has to be
addressable by a digest that outlives the run that made it.

The plan assumed the publishers already computed digests and discarded
them into step summaries, so this would be a matter of promoting an
existing value to a job output. Reading all fifteen, that is true of two.
image-nvcr and image-provisioned-nvcr compute per-arch and index digests;
agent-artifact parses one from oras and keeps it only long enough to build
an index. The other nine capture no registry digest at all -- the cli,
chart and nvcr publishers push and record nothing but success.

So this resolves rather than parses. One mechanism covers images, OCI
artifacts and Helm charts alike, because at this layer they are all
manifests behind a reference, and it avoids teaching the release layer
the output format of three different clients. It is also the stronger
claim: a parsed digest is what the client said it pushed, a resolved one
is what the registry will serve the next consumer, and those differ
exactly when something is wrong.

Two adopters here, one of each kind. image-nvcr had the index digest and
no way to keep it. chart-publish had nothing, and needed a docker login
as well, because helm writes its own registry config where crane cannot
see it.

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

* ci(release): record digests from the remaining seven publishers

Completes the digest capture started for the controller image and its
chart. Nine components are now addressable by a digest that outlives the
run that published them.

Three things the remaining publishers forced:

The recorder takes a list of references, not one. The CLI publishers tag
by OS and architecture and build no index, so four references are one
component with no single manifest to point at; a candidate pinning only
linux/amd64 would claim a coverage it does not have.

Both helm publishers and the nktp one needed a docker login added. helm
registry login writes helm's own config, which crane cannot see, so the
existing login left the recorder unauthenticated against a registry the
job had just pushed to.

The component carries the destination wherever a job has a matrix. The
nvcr chart and cli publishers each run twice over nke and dsx, and two
legs uploading the same artifact name collide.

nktp is worth calling out: its checksums.txt hashes the local archive,
and its reuse branch can publish nothing at all, leaving a checksum of a
file that was never pushed. The record says what GHCR actually serves on
both branches.

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

* fix(e2e): build the CWE with a version it will report back

Run 36045936723 deployed the whole stack on Forge hardware and then
failed on

  CWE reports version "cd95099", want "cd9509990c8f"

which is one commit written two ways. GIT_VERSION only names the image.
BUILD_VERSION is what the ldflags bake into version.Version, so it is
what the running CWE answers with, and the site lane was setting only
the first. Left alone the controller Makefile derives BUILD_VERSION from
`git describe --always`, which abbreviates to seven characters on a
checkout with no controller/v* tag within reach.

Also stops reporting an absent diagnostics directory as a failure to
collect diagnostics. nkectl writes that directory when it fails, so its
absence is the ordinary case -- here it meant the deploy had worked --
and the error sent the reader looking for a second fault that was not
there. A directory that exists and cannot be archived is still an
error, and now a distinguishable one.

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

* fix(e2e): relay the tenant API server through the site node

Run 36051890151 brought up a working tenant cluster on Forge and then
failed to look at it. CWE reported KubernetesReady for every desired
node, and 0.6 seconds later the spec that confirms the same thing from
the cluster side timed out on

  Get "https://10.91.194.69:6443/api": dial tcp ...: i/o timeout

That address is the tenant's control plane VIP. It is reachable inside
the site and not from a GitHub runner, so every tenant client in the
Forge lane was dialing somewhere it cannot go. The site's own kubeconfig
has been going through a tunnel since this lane was written; the tenant's
never was.

Forward now takes a host:port rather than a port. It always dialed
through the site node, so it could already reach anything the node can,
but hardcoding loopback left no way to say so. The site's own API server
is still loopback and passes it explicitly.

WithEndpointRelay substitutes a reachable address for each tenant API
server and pins tls-server-name to the host the kubeconfig published,
without which TLS fails verification instead of connecting. It hooks in
at tenantRESTConfigAs, the single point both GetClient and GetAdminClient
resolve an endpoint through, so all twenty-odd tenant specs are covered
rather than just node readiness. Lanes that share a network with their
clusters set no relay and are unaffected.

Also raise the Forge tenant's delete timeout from 30 to 45 minutes. The
same run failed the delete at 1800.306s while its instances were still
reporting Terminating, which Forge takes 20 to 40 minutes to finish. That
one was a budget, not a route.

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

* feat(e2e): record the run's resolved inputs as an artifact

A green run says seven specs passed. It does not say what they passed
against. The controller SHA, the OS image, the stage and where each of
them came from are all in the job log, but only because Actions echoes
every step's env block, and only until GitHub drops the log.

The GitLab lifecycle pipelines solved this in their generate job, and
for the same reason its comments give: a summary is worth having only
if it reports what the run resolved rather than what its last editor
remembered, and only if it outlives the log.

So this collects the inputs once, into run-inputs.txt, uploaded beside
site-e2e.log. Each value carries its provenance, because the same
`full` can come from a dispatch input, a repository variable or the
default, and which one it was is usually the question. The generated
e2e-config.yaml is appended so the artifact stands on its own.

The table would rot the first time someone adds an input and forgets a
row, so it does not have to be remembered: the step scans the workflow
for every inputs.* and vars.FORGE_* it references and fails if the
table does not cover them.

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

* feat(e2e): fail on an empty filter, and write JUnit, in the Forge lane

backend-e2e-lib.sh has passed all three of these since it was written.
This lane passes none of them, which was not a decision.

fail-on-empty is the one that matters. A label filter matching nothing
is otherwise a pass, and this lane spends half an hour of bare metal
before its first assertion -- rename the site-controller label and the
result is a green run that provisioned hardware and qualified nothing.
That is the single result a qualification lane must be unable to
report, and the SADD asks for the flag by name for this reason.

junit-report gives the run a machine-readable statement of which specs
it ran, beside the log a person reads. no-color stops Ginkgo's escapes
from landing in an artifact; reading site-e2e.log currently means
stripping them first.

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

* fix(e2e): stop waiting three times on one stuck tenant delete

Run 36147423536 spent 112 of its 150-minute suite waiting on a single
tenant that never deleted, and the suite timeout then fired inside the
site teardown, before it released the Forge instance. The instance was
still Ready two and a half hours later and had to be deleted by hand.

Three waiters, each with a full budget, on the same cluster:

  deletes the cluster spec   45m  tenant_test.go
  tenant AfterAll            45m  tenant_test.go
  site AfterAll sweep        22m  cut short by the suite timeout

The second was the bug. deleted is set only after the wait succeeds, so
a wait that timed out left it false and the AfterAll ran the identical
delete-and-wait again. Track that the delete was requested and waited
separately from whether it succeeded, and skip the repeat: the cluster
is not moving, and the time belongs to the site teardown.

The sweep budgets were the other half. At 40 minutes inside a 45-minute
NodeTimeout they left the site release five minutes, so a slow sweep
starved the one step that must not be skipped. A leaked site is worse
than a leaked tenant -- it is the larger instance, and its CWE is the
only thing that can still delete the tenants.

Raising the delete budget would not have helped: the tenant did not go
in 112 minutes, so it was stuck, not slow.

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

* docs(qualification): document the hardware qualification lane

The lane had no entry point. Someone arriving at docs/qualification found
three reference pages and nothing telling them what the lane is, what it
proves, or what it does not.

overview.md is that front door: qualification against CI lanes, the four
layers, how a run is triggered, the three stages and what each costs, the
artifacts a run leaves, and a plain statement of what is qualified today
and what is not.

The other three are the references it points at. hardware-lane.md explains
how each layer actually works, environments.md the schema and capability
matching behind environments/forge.yaml, and triage.md how to tell a
failure of ours from a failure of the site -- including the DHCP signature
that cost a day to recognise the first time.

Indexed in docs/README.md, which is the index of record.

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

* ci(e2e): remove the Forge connectivity probe scaffolding

The probe existed to answer four questions before anything merged: whether
the ARC fleet could reach the Forge API and the Teleport proxy at all,
whether the documented password jump-host route worked, and whether the
join token would mint a certificate for a feature branch. All four are
answered, and the site lane has since run green on hardware end to end,
which answers them more convincingly than the probe did.

Its own header said SCAFFOLDING -- remove before merge, and its triggers
were the scaffolding: push on this branch, because workflow_dispatch reads
its trigger from the default branch and the probe had to run before it was
there, and pull_request on main, because the join token accepts
refs/pull/*/merge but no feature-branch ref. Both fire on every push, so
the probe has been adding two check runs per commit to a pull request that
no longer needs it.

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

* DCO Remediation Commit for Ron Compos <rcompos@nvidia.com>

I, Ron Compos <rcompos@nvidia.com>, hereby add my Signed-off-by to this commit: dfb5c253d8
I, Ron Compos <rcompos@nvidia.com>, hereby add my Signed-off-by to this commit: c0b2427202
I, Ron Compos <rcompos@nvidia.com>, hereby add my Signed-off-by to this commit: 10a672770f
I, Ron Compos <rcompos@nvidia.com>, hereby add my Signed-off-by to this commit: aaaec476f8
I, Ron Compos <rcompos@nvidia.com>, hereby add my Signed-off-by to this commit: dfc215236e
I, Ron Compos <rcompos@nvidia.com>, hereby add my Signed-off-by to this commit: 17a4c99064
I, Ron Compos <rcompos@nvidia.com>, hereby add my Signed-off-by to this commit: 1e5b6179c6

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

* fix(e2e): pass the Bitnami chart auth.postgresPassword

The deploy path's postgresql/values.yaml says the site secret arrives as
auth.postgresPassword; the SBOM deployer was sending auth.password. It works
today only because the committed values set auth.username: postgres, which is
the one case where the chart falls back to auth.password. Rendered at the
pinned 18.5.15, any other username puts our value in a separate `password`
key and generates a random superuser password instead -- so giving CWE and
Temporal an account of their own would break the install with the failure the
deploy path warns about by name, the Temporal schema job crash-looping on
password authentication.

The unit tests only ever checked the values file, which cannot see this. The
chart tests now render postgres and temporal and assert the password reaches
postgres-postgresql's postgres-password and both of Temporal's store secrets.
The unit test also checked only Temporal's visibility datastore, and setting
one of the two is the specific mistake being guarded against, so it now checks
both.

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

* feat(e2e): redact the diagnostics archive before it is uploaded

The site lane tars nkectl's diagnostics off the node on a failure and the
workflow uploads the result as an artifact, so it outlives both the node and
the scope of the credentials the run placed there. A journal line or a dumped
Secret is a plausible place for one to surface.

Substitute every value the run wrote onto the machine out of the archive on
the runner, in its plain and its base64 form, before the file is written. By
exact value rather than by pattern: the suite generated or was handed each of
them, which is what makes this reliable and also what bounds it.

Redacting on the node would have put the values in argv, so the rewrite is
done in Go against the fetched bytes. Tar headers are rewritten with it,
since the marker is a different length from what it replaced.

The tenant and database passwords move to the lane so that everything placed
on the node is a value placedSecrets can name; the deployer keeps generating
a database password for callers that do not supply one.

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

* refactor(e2e): label both nico-forge entries and stop sharing one spec value

The site lane's tenant entry deliberately carried no nico-forge label, on the
reasoning that the label selects the lane against an existing site and must
not start building one. The label was never what guaranteed that.
-e2e.site-stage is: unset, the site lane's tenant subtree is not constructed
at all, so no filter can reach it.

Label both entries, since nico-forge is true of both, and discriminate with
site-controller, which accumulates from the container and so is on one and
not the other. Verified by dry run at -e2e.site-stage=full:
`nico-forge && !site-controller` selects 4 specs, `site-controller` 7,
`nico-forge` 8. Without the flag a bare nico-forge selects 4 and reaches no
hardware. That makes adding the label correct rather than dangerous, and the
invariant stops being an absence a future edit can silently remove.

Make the shared spec a function while here. Entry copies the struct, but
shallowly, so a package variable handed both lanes the same pool slices and
the same capabilities map. Nothing writes through the alias today --
forgeNodePoolSpecs allocates and copies field by field -- but nothing
prevents it, and a default written into one lane would change the other with
nothing in either file to show why.

Document the filters in the e2e README, which named no way to run the tenant
lane on its own.

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

* refactor(e2e): read Forge identifiers from the environment

environments/forge.yaml carried the org, site, VPC, subnet, SSH key group
and instance-type ids of the RelEng Forge account, and its comments carried
the org's human name, the site's location, the other site's name, the fabric
types, the pool sizes and the dates of two provisioning exercises. None of it
is a credential, which is why it read as safe. It is still a map of
infrastructure that is not ours to publish, and this repository is the staging
ground for a public one.

Every identifier is now a ${NAME} the loader resolves from the process
environment, supplied in CI from repository variables -- the route
FORGE_TELEPORT_PROXY and FORGE_JUMP_HOST already take, for the same reason.
An unset one fails the run at the environment file: expanding it to an empty
string would leave a file that still parses, so the failure would arrive from
Forge, naming its field rather than the variable nobody set.

What stays in the file is the part that is engineering rather than account --
which sites exist, which machine shapes they offer, what those shapes
`provides` -- because that is what explains why a run matched the machine it
did, and it is what a reviewer needs.

The site is filed under `default` rather than its own name. Site("") already
resolves the only declared site, so nothing had to be told which.

Test fixtures used the real ids for no reason; they are synthetic now, and
UUID-shaped where BuildCreateRequest parses them. TestCheckedInEnvironmentsParse
substitutes synthetic values discovered from the file itself, so it still
proves the checked-in environment is well-formed wherever it runs.

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

* ci(secrets): scan every branch, not just pull-request mirrors

The triggers named pull-request/[0-9]+ and dependabot/** and nothing else, so
a branch pushed directly to this repository was never scanned until copy-pr-bot
mirrored it -- which happens when a pull request is approved for CI, after
review rather than before it. Four open pull requests from in-repo branches had
never had this check run at all.

The restriction was not deliberate. It came from the reason the workflow runs
on push in the first place: self-hosted runners do not pick up pull_request
events, so the fork route was the only one anyone needed. A push to an in-repo
branch is also a push, and is picked up the same way.

So: every branch but main. Main is still excluded because a range scan needs
two ends and a push to main gives no reliable one after a force push.

A check that finds a committed credential is worth the least when it runs last.

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

* chore(secrets): allowlist the redaction test's synthetic credentials

The redaction test asserts that a token and a password are absent from the
diagnostics archive, which means it has to put strings in that look like a
token and a password. generic-api-key matches both, as it should -- the test
would not exercise anything if it did not.

Scoped to the two literals rather than to the file, so a real credential added
beside them is still caught. Both are plainly synthetic: an nvapi- prefix
followed by a counting sequence, and the MD5 of "12345".

Found by running the scan on a branch for the first time, which until the
previous commit it never was.

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

* chore(secrets): allowlist the two superseded forge.yaml commits

gitleaks matches the SSH key group id on entropy. It is a UUID rather than a
key, and a key group governs Serial-over-LAN console access rather than
granting anything, so there is nothing to rotate. The values are gone from the
tree; these two commits are where they were.

Scoped to that one file in those two commits, so a credential elsewhere in
either is still caught and so the entry expires by itself when they do. The
repository squash-merges and deletes the branch, so neither commit reaches
main's history.

Left red, this would be the first entry in the list of checks people learn to
ignore -- which is what the workflow's own header warns about.

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

* refactor(e2e): stop naming internal Teleport and network resources

Three things the lane named that it does not need to.

The tbot join token was written into the generated config, so it was the one
functional reference rather than a comment. It moves to
FORGE_TELEPORT_JOIN_TOKEN, a variable and not a secret for the same reason the
jump host is one: it names a Teleport resource, and joining also requires this
repository's OIDC identity, which is what the token is bound to.

The bot's role, the label the jump hosts carry, how many of them there are and
the cluster's own name were in comments only. What a reader needs is that the
bot's role grants root and that the probe confirmed the certificate carries
it, which survives without naming which role on which cluster.

A test asserted against 10.91.194.69, a tenant API VIP observed in a real run.
It is RFC1918, so nothing outside can reach it, but it is a real address used
where a reserved one belongs -- it is now in 192.0.2.0/24, which is TEST-NET-1
and reserved for documentation. The comment beside it says what the address is
for rather than which one it was.

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

* refactor(hack): require the Forge site rather than defaulting it

create-forge-nico-cluster.sh defaulted four identifiers of a real Forge site,
and listed five of its instance types by name and id in a reference comment.
They arrived with the original cloud-workflow-engine import and never changed.
Nothing records a cluster having been created there, so they were a published
map of an account that no longer answers for anything.

Required now, with every missing name reported at once. A site either exists
or it does not, and guessing one only moves the failure to an API rejection
naming a field the caller never set. The reference command stays, written
against the variables instead of against particular values.

The same identifiers were fixtures in three other places -- two integration
test request bodies and a migration test -- which is how a retired site's ids
end up in a repository long after anyone stops using them. Those are synthetic
now.

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

* feat(ci): check the tree for internal identifiers

The Secrets workflow answers "was a credential ever committed". Nothing this
review found was a credential -- a Forge org, site, VPC or subnet id grants
nothing and rotates never, which is exactly why nobody treats one as
sensitive. Together they are a map of infrastructure a reader outside NVIDIA
does not otherwise have, and this repository is the staging ground for a
public one. So: a second check, asking whether the tree that ships names any
of it.

BY DIGEST. A check that listed the identifiers it forbids would publish them
itself. It extracts every UUID in the tree, hashes each distinct one, and
compares against a list of digests -- a UUID has enough entropy that this is
not reversible, which is why the list is UUIDs. Shorter values are handled by
shape instead, and those patterns name nothing internal either. Failures
report locations only, never the value, because a CI log is readable by more
people than the tree is.

NARROW ON PURPOSE. The first draft flagged RFC1918 addresses, bare UUIDs and
*.nvidia.com, and produced 40 findings of which 6 were real -- a check nobody
would keep. It now flags nothing it cannot justify: pod CIDRs are legitimately
10.x, most UUIDs here are fixtures, and ngc.nvidia.com is how a public
consumer reaches NVIDIA.

Found 6 real identifiers already in the tree, all pre-existing, fixed in the
commit before this one.

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

* docs(qualification): name the hardware half, and diagram it

The prose explained the lane well but had no pictures, and the first thing a
new reader needs is a picture. Add seven diagrams across the three documents
and settle what this half of the workflow is called.

Naming. The responsibility here is environment provisioning: take a
declaration of infrastructure plus a request for capabilities, produce a live
system under test, release it again. That is the vocabulary the code already
uses -- internal/environment, Provider.ProvisionNode, Session.Teardown -- so
the document now says so, and reserves "the hardware lane" as the informal
name for the lane that does it on real machines. Three words, three jobs: the
hardware lane is the CI path, the Forge lane is its only implementation, and
provision is the first step alone.

Consequently "layer" is no longer used for the hardware sequence, which is
now steps, here and in triage.md. That leaves layer free to mean a gating
tier, which is the only other thing it was being used for.

Diagrams:

- the three concerns and which one you are reading about (overview.md)
- the four steps as a ladder, with all three site-stage values marked where
  they stop, which is also where bootstrap stopping before the NKE stack
  becomes visible
- the provisioning handshake, where almost every surprise in this lane lives
- the six bootstrap steps, with steps 3 to 6 boxed as root in a login shell
- tenant creation through CWE, with a blocked arrow to the Forge API, because
  a lane that took the direct path would pass while the product was broken
- every network hop from runner to tenant API server, and the relay
- the triage decision tree

Rendered with mermaid-cli before committing. This is the same change made on
feat/e2e-forge-tenant-gpu, adapted: four steps rather than five, no GPU
runtime, and a triage tree matching this branch's sections.

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

* fix(ci): fail the internal config check when ripgrep is missing

The gate is required, and it was reporting a clean tree without reading it.

ripgrep is not on the GitHub-hosted Ubuntu images and the job installed
nothing, so both call sites fell through to their no-match path: the identifier
scan ended in `|| true`, and the shape loop tested `if hits="$(rg ...)"`, where
ripgrep's exit 2 lands in the same `else` that prints `ok`. A tree carrying a
real violation passed.

Distinguish the two outcomes. Exit 1 is "no match" and remains a pass; anything
above it is ripgrep failing, which is now fatal rather than clean. Refuse to
start without `rg` and `shasum`, and check that ripgrep has PCRE2 -- a build
option the shape patterns depend on. Install ripgrep in the workflow so the
check has a scanner, and correct the header comment that claimed the runner
already provided one.

Verified by planting a sixteen-digit org id in the tree: with ripgrep removed
from PATH the old script printed "internal-config-check: clean", the new one
exits 2.

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

* fix(e2e): remove the rendered values even if a write fails partway

The deferred `rm -rf` of the values directory was registered after the loop
that fills it, so it only ran if every write succeeded. Each of those files
carries the Nico, registry and tenant bootstrap tokens plus the generated
database password, and the map is walked in random order -- so a failing Put
left some subset of them on the node, and which subset varied run to run.

Register the cleanup before the first write. Give its context a deadline as
well: it was detached with `context.WithoutCancel` but unbounded, unlike the
release paths in the forge provider, so a wedged session could hold the spec
open indefinitely.

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

* fix(e2e): do not abandon a Forge instance to the create timeout

The HTTP client capped every request at one minute, create included. Forge
builds the instance before it answers, so a create slower than that cap left a
machine running with nobody holding its id -- and the id is the only handle on
it, because the list endpoint caps at twenty rows and ignores every filter.
Nothing in the run, and no reaper, could find it again.

Give create its own client with a ten-minute timeout. The short cap stays on
everything else, where it is what makes a hung poll fail and retry rather than
stall. The copy is taken before SetAPIName wraps a transport, so neither
client wraps the other's, and each configuration gets its own Servers value.

A create that fails even so now says the instance may exist regardless, naming
it so somebody can look. Reporting a clean failure over a machine that is
still running is worse than the failure.

Two tests: a create slower than the per-request cap must still complete, and a
failed create must say what it cannot rule out. The first fails on the old
code with "Client.Timeout exceeded while awaiting headers" after the server
has taken the request.

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

* fix(e2e): size the go-test backstop against the cleanup it has to contain

The gap between -ginkgo.timeout and `go test -timeout` was 15 minutes, and the
comment called it teardown's budget. Teardown's actual worst case was 105.

A cleanup node entered while the suite is already interrupted is granted its
whole NodeTimeout again, so the worst case is every cleanup node end to end:
the tenant AfterAll's hour plus the site AfterAll's forty-five minutes. Once
that overran the gap, the go-test backstop fired -- and it panics rather than
unwinding, so the deferred release never ran and the site's Forge instance
leaked. The failure mode the whole three-timeout arrangement exists to avoid.

Fix it from both ends. The tenant AfterAll's hour was never sized against its
own contents: WaitForClusterDeleted is bounded by the entry's
nke.Options.Delete, 5 or 10 minutes throughout, so fifteen leaves half again
over the largest. That takes the worst case to 60. Then widen the backstop to
cover it -- 150 + 60 + 10 for the unwind -- and the runner's bound to match.

These two bounds are only ever reached by a run that has already gone wrong; a
healthy `full` is about an hour, and raising them does not lengthen it. Both
notes now carry the arithmetic, so the next person to touch one can see what
it has to contain.

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

* fix(secrets): scope the forge.yaml allowlist by shape, not by commit

The allowlist pinned the two commits the Forge identifiers used to sit in.
That was the tighter scope, and it cannot survive a rebase: the Secrets job
scans origin/main..HEAD, a rebase gives every commit on the branch a new sha,
and the allowlist then names commits that do not exist. The job goes red over
its own configuration. Both hardware branches are behind main and due a
refresh, so this was about to happen.

Listing the values instead -- the form the redact_test entry uses -- is not
available here: writing them into this file publishes the identifiers
hack/internal-config-check.sh exists to keep out of the tree.

So allow a UUID, in that one file, and nothing else. That a UUID is not a
credential is the argument the entry already made. A secret of any other
shape in that file is still caught, as is anything in any other file, and the
tree is held to the stronger rule by internal-config-check.

Verified with gitleaks 8.30.1, the pinned version, over origin/main..HEAD: no
leaks. Rewriting the two shas in the old config to stand in for a rebase
turns it red with 2 findings; the new one is unaffected.

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

* fix(e2e): parse the lane config strictly

environment.go has used UnmarshalStrict since it was written; config.go did
not. An unknown key was dropped in silence and the run continued on the
default, which shows up half an hour into bare metal as behaviour nobody
asked for, over a file that reads correctly.

The package had no tests. It has four now: the example config and the
document the workflow's heredoc writes both still load, an unknown key is
rejected, and -- recorded because it looks like a gap and is not -- a key
differing only in case still binds. This decodes through encoding/json, whose
field matching is case-insensitive, so `jumphost` reaches JumpHost. That is a
match rather than a miss, and nothing is lost.

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

* fix(ci): keep the jump host out of the log and the run-inputs artifact

The site lane wrote the jump host to the job log twice -- once echoing the
generated config, once in the resolved-inputs table -- and the second of those
tees into run-inputs.txt, which is uploaded and kept for seven days. There was
no ::add-mask:: anywhere in the workflow.

A variable rather than a secret, and rightly so: a hostname grants nothing.
But it is the access path to the site, which is why it is deliberately kept
out of environments/forge.yaml, and publishing it in a log undoes that. This
pull request adds a merge gate whose whole purpose is keeping internal
topology out of the tree; the same value should not leave by the log instead.

Mask it as soon as it is known, which covers the rest of the job. Masking does
not reach files, so the artifact is redacted separately: the table prints
"<set, withheld>", and the config is filtered on the way through. Both keep
the part an operator needs -- that it resolved, and from where.

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

* fix(ci): verify the Teleport tarball, and install it without sudo

The step's comment said "Pinned, and checked". Only the version was pinned:
the tarball was extracted and installed with nothing comparing it to anything.
gitleaks, in secrets.yml, is digest-verified against a committed checksum --
so the pattern already exists in this repo and this download was the exception.

Follow that pattern exactly. The digest is committed in make/tool-versions.mk
beside the version, deliberately rather than read from the CDN's own .sha256:
same host, so the same compromise boundary. Both are read back with
`make print-`, which is how secrets.yml does it, and TELEPORT_VERSION joins
show-versions. The pin is not free to move -- it is matched to the Teleport
cluster's server version -- so the reason lives next to it.

Install without sudo while here. /usr/local/bin is not writable by the runner
user on the self-hosted runners, which secrets.yml already records; tsh and
tbot now go to ~/.local/bin and onto GITHUB_PATH, where the relay finds them
by name.

Digest verified against the published .sha256 and recomputed from the
download.

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

* chore(ci): correct the SITE_INPUTS note and ignore what it writes

The comment said SITE_INPUTS was left at the Makefile default. It is not: the
default is a $HOME cache and the next line overrides it to a path inside the
workspace. Say what it does and why -- a $HOME cache survives between jobs on
a self-hosted runner, and a stale archive there would be staged in place of
the one the run just built.

Because it is inside the checkout, .gitignore needs the entry it did not have.
It is nkectl plus three `docker save` archives, so a local run leaves hundreds
of megabytes showing as untracked.

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

* feat(ci): emit the ginkgo JSON report the qualification flow reads

`qualify summarise` turns a lane's ginkgo reports into the outcome that
`publish` records, and it reads JSON, globbing `report*.json`. JUnit has no
equivalent of PreRunStats, and without those a leg's skip count is the size of
the suite rather than the size of the run -- which is why every other lane
emits both, via backend-e2e-lib.sh.

This lane emitted JUnit only, so it could not be wired to summarise without
also changing how it runs. Emitting the report now is the half that cannot be
added after the fact, and it costs a file on the runner.

Deliberately not added to the artifact upload. A ginkgo report carries
captured spec output, which on this lane is remote command output over
Teleport; summarise reduces it to an outcome in-job and defaults
`--keep-report` off for the same reason. The .gitignore entries cover the rest
of what `go test` leaves in the e2e directory, including the diagnostics
tarball, where an accidental commit would be a disclosure rather than noise.

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

* refactor(e2e): parse the qualification flags with the shared package

-e2e.versions and -e2e.capabilities are a contract with the qualify tool that
emits them, not a suite-local convenience. This lane had its own parser for
that format, and the qualification work has another in
internal/qualification, so the two sides had two places to drift apart in a
format neither owns alone.

Adopt the shared package here. qualification.go and qualification_test.go are
copied byte-identical from the qualification branch, so when that work lands
it deletes its duplicate rather than merging one.

The accessors keep their signatures and their laziness. requireVersion and
optionalVersion are unchanged, and parsing still happens on first use rather
than in BeforeSuite, because specs read the versions while building their
tables and a malformed flag should be one failure rather than one per entry.

Two edge cases tighten. An empty entry ("a=1,,b=2") and a whitespace-only
flag value were accepted before and are errors now. Neither is reachable from
the workflow, which passes three well-formed pairs; both are the kind of input
that means the emitting side is wrong, which is what the shared parser's
comment says it refuses to paper over.

Verified: go vet clean across the e2e module, the suite binary compiles, all
11 internal packages with tests pass, gofmt clean, and the exact -e2e.versions
string the workflow passes parses to the three components the specs require.

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

* fix(e2e): spell two comments the way misspell wants them

The e2e module sets misspell locale: US, so the British double-l and
-our forms are hard errors, not style. `dialled` in teleport/client.go
is what turns `lint / golangci-lint (controller/test/e2e)` red on both
hardware-lane PRs, and takes `gate` down with it. `behaviour` in
config.go arrived with the UnmarshalStrict change on this branch and
would have failed the same job once that landed.

The surrounding prose keeps its British register; only the two words
misspell knows about move.

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

* refactor(e2e): rename ForgeNodeInputs to nke.NodeInputs

Nothing in this type is specific to a provider: the bootloader and image
URLs, the Kubernetes, CNI and SPIRE versions and the agent arguments
describe any NKE node built from an image. Naming it for Forge said
otherwise, and in package nke it also stuttered as nke.ForgeNodeInputs.

The rendering *is* provider-specific -- it templates nico_forge_ipxe and
nico_forge_prekubeadm -- so BuildForgeNodePayloads keeps its name, and the
type's doc comment now says where the line falls.

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

* refactor(e2e): report a node's architecture on infra.Node

A caller that wanted to know a node's architecture had to hold the Forge
instance type it was matched from and read Provides["arch"], so learning a
property of the node meant reaching through a provider-specific type and
knowing that provider's capability key. infra.Node now carries Arch, the
Forge provider fills it from the type it matched, and ForgeInstanceType
grows an Arch() accessor so the key stays in the package that defines it.

That was the only read of siteLane.instanceType, and siteLane.site had
none, so both fields go. MatchInstanceType stays as an explicit preflight:
it is what makes a capability set nothing can satisfy fail before a machine
exists rather than a minute into provisioning.

TestProvisionNode now asserts the architecture reaches the node; it fails
on the old code.

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

* refactor(e2e): reduce the site config to where artifacts come from

The site: block carried per-run identity, test shape and per-site access
alongside artifact sources. Keep only the sources:

- images is a map of controller, capi-provisioned and profiles, each with
  a repository and an archive, replacing images, controllerRepository,
  profilesImage and bootstrapEnv. Tags come from -e2e.versions
  (capi-provisioned is a new key); Load validates the set is complete.
- name is always generated per run.
- cni and disableMTLS are constants in test code. disableMTLS cannot be
  derived from the TPM thumbprint: cloud-init needs it before the node
  exists, and Forge reports none.
- jumpHost, teleportLogin and the plain-SSH jump host fields move to the
  Forge site in environments/forge.yaml, via a new optional ${NAME:-}
  reference so the standalone tenant lane still loads without them.
- deployPathRef defaults to the controller version's commit, or its
  controller/<version> tag, instead of HEAD.
- registryServer goes: the node's only pull is CAPNICo from GHCR.

The runner can now pull the published images from NVCR as well as GHCR:
SITE_IMAGE_REGISTRY in the Makefile and an image-registry input
(FORGE_E2E_IMAGE_REGISTRY for PR runs) in the workflow, logging in with
NGC_API_KEY against the FORGE_E2E_NGC_ORG org.

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

* fix: address CodeRabbit review on the Forge site controller lane

- record-digest resolves sha-<commit>, the one reference every publish run
  pushes; the version tag exists only on release-tag runs
- gate the labeled trigger on the label just added, not the PR's label set
- give the eight Forge variables resolved-inputs rows so the coverage check
  passes; withhold the Teleport join token like the jump host
- bound the jump-host SSH handshake and channel open with a connection
  deadline and cancel them with ctx
- bake SITE_CONTROLLER_VERSION as BUILD_VERSION so the image tag, reported
  version and expected version agree
- track diagnostics collection in memory and drop a stale archive at start
- internal-config-check: lowercase UUIDs before hashing, scan the files git
  ships rather than ripgrep's ignore-filtered walk, print shape hits as
  locations only
- integration-test README: the default request files carry placeholder IDs

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

* refactor(e2e): drop site.repo and move teleportIdentityFile to runner

Two review comments on the same config surface.

`site.repo` let a run point the deploy-path export at a clone other than the
one the suite runs from. The deploy path is always this repository's, so the
override only ever named a different working copy of it, and `deployPathRef`
already covers the case that comes up -- a different ref in the clone you are
sitting in. The export now resolves the clone unconditionally.

What does not change is the anchoring: `inRepo` still resolves relative
archive paths against that clone, so only the ability to redirect the anchor
goes. Both doc comments are reworded to name the clone rather than the field.

`teleportIdentityFile` describes the machine running the suite, not the site
it reaches -- which its own doc comment already argued, while leaving the
field under `site` anyway. It moves to a top-level `runner` block, where the
block name carries the argument instead.

Both are breaking for a config that names them, and deliberately so: Load
parses strict, so `site.repo` and `site.teleportIdentityFile` now fail with a
message rather than being dropped in silence and the run proceeding on a
default. Both join the retired-key list that exists for exactly this, and a
new test covers `runner.teleportIdentityFile` binding one block up.

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

* refactor(ci): name the capi-provisioned version for its component

`SITE_PROVISIONED_VERSION` was the one name in the lane that did not match
the component it carries. Everywhere else it is `capi-provisioned`: the
-e2e.versions key the suite parses, and the config field that holds its
image. The workflow env now says so.

Renamed at all three uses rather than only the definition. The variable is
also read at the site-inputs step and in the -e2e.versions string, and
renaming just the `env:` key would have left both expanding to empty while
the Makefile default quietly covered for it -- the archive pulled at
v0.1.0-rc.1, the suite bootstrapping with no reference at all. That is the
silent version mismatch this block exists to prevent.

The make variable keeps its name. Everything in that interface is SITE_*
(SITE_CONTROLLER_VERSION, SITE_IMAGE_REGISTRY, SITE_ARCH, SITE_INPUTS), so
the two vocabularies meet at the site-inputs call rather than one of them
growing an exception.

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

* refactor(ci): rename the lane's inputs off the FORGE_ prefix

Six repository variables carry FORGE_ without meaning anything Forge:
stage, controller version, OS image, OS image bootloader, image registry
and NGC org are the lane's inputs whatever provisions the hardware. They
become SITE_E2E_*. The variables that name Forge resources or the access
path to them -- FORGE_JUMP_HOST, the Teleport pair and the six Forge IDs --
keep the prefix, because a second provider would bring its own.

SITE_E2E_ rather than a bare E2E_: repository variables are repo-wide and
there are eleven other e2e lanes here, so an unscoped E2E_STAGE would be
the wrong kind of name to claim.

No flag day. Each of the six reads `SITE_E2E_* || FORGE_E2E_*`, so the
rename does not have to be atomic with creating the variables -- which it
could not be, since a variable lives in repository settings and this file
lives in git. A run works on either name, and the resolved-inputs summary
now reports which one answered and names its replacement, so the fallback
can be removed once no run prints a deprecated name. That is also why the
provenance rows grew two fields rather than the old name simply being
overwritten.

The coverage check had to widen with it, and this is the part worth
reading twice. It derives the set of variables that must be documented by
grepping the workflow for `vars\.FORGE_[A-Z0-9_]*`, so a variable renamed
out of that prefix stops matching and drops out of the audit -- no
failure, just six fewer variables checked, by the one step whose whole
purpose is catching an unrecorded input. The pattern now names both
prefixes. Simulated against this file: 16 variables audited under the old
pattern, 22 under the new one.

Also updated the three doc strings and two error messages that spelled
FORGE_E2E_* to a reader.

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

* fix(integration-test): replace a retained subnet id in the default requests

Seven of the eight ids in these two fixtures follow the synthetic convention
internal-config-check asks for; the first subnetIDs entry did not. It read as
already sanitised because an obvious placeholder sat beside it, and the check
cannot catch it either way: it hashes the tree's uuids against a list of ones
already known, so an identifier nobody wrote down passes.

The README said outright that the site, VPC, subnet and instance-type ids are
placeholders, which was true of everything except that entry.

Also fix the run instructions, which CodeRabbit held its thread open for. The
package is behind the integration_test build tag, so the example command found
no tests and reported success, and the copy step did not mention nico.orgID --
the one value in these files that carries a dev default rather than a
placeholder, and so the one a live run is most likely to leave pointing at
someone else's org.

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

* fix(e2e): treat an empty environment reference as unset

expand branched on os.LookupEnv's presence alone, so a variable that was set
but empty substituted as "" and never reached the missing list. The comment
directly above it describes preventing exactly that: a file that still parses
and a run that asks Forge to create a cluster in org "".

Set-but-empty is the shape CI actually produces. `env: FORGE_VPC_ID: ${{
vars.FORGE_VPC_ID }}` is the empty string when the repository variable does
not exist rather than absent, and the `||` fallback chains this lane now uses
are empty when none of the candidate names exist. So the gap was only
reachable on a runner, which is the one place it matters.

Empty now takes a ${NAME:-default} too, which is what the shell form this
borrows already does.

Also validate each instance type's id and name in ForgeSite.validate. The
site's own identifiers were checked and the types were not, so an empty
instance type id reached CreateInstance as instanceTypeId "" and failed
naming Forge's field rather than the variable nobody set.

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

* fix(e2e): fail cloud-init when a node command fails

cloud-init runs the runcmd entries as one /bin/sh script with no set -e and
reports the exit status of the last command, and the last entry here creates
the kind network with `|| true`. The script therefore always succeeded.

That defeats the check meant to reject a bad node: ProvisionNode relies on
`cloud-init status --wait`, which could not fail. A timed-out default-route
wait, a failed apt step, or a failed curl for nerdctl, kind or clusterctl all
reported a node that came up clean, and the run died much later inside
bootstrap -- as "clusterctl: executable file not found" rather than as the
step that did not run. That late failure is the one the comments here and on
HostTools claim to have designed out.

set -u is safe because every command is fully rendered before it is sent;
nothing in the script reads a shell variable. The shared node commands
tolerate set -e too: each is an apt install, a curl of the apt key or a
systemctl restart, and none relies on surviving a non-zero exit.

The test asserts the entry is first rather than merely present, since
anything above it would still run unguarded.

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

* fix(ci): scan the capnico installer instead of exempting it

The exemption was whole-file, so it covered more than the value it was
accepted for: a Forge uuid or a management hostname added to that script
later would go unscanned and the gate would still report a clean tree. That
is a different risk from the one the comment weighed.

Exactly one line caused it, the NGC org in the default chart repository URL,
so make the org a variable and drop the exclusion. Give CAPNICO_HELM_ORG and
the URL is derived; give CAPNICO_HELM_REPO_URL and the org is not read at
all. Nothing in the repository reaches this path -- every caller sets
CAPNICO_SOURCE_DIR and takes the source-chart branch -- and the released
branch already requires NGC_API_KEY, which no workflow sets, so this is one
more value for a human who already has NGC credentials.

Verified by putting the literal back into the tree and watching the check
fail, then removing it.

Also correct environments.md, which still said VPC and subnet identifiers are
checked in. They are ${FORGE_*} references like the rest, as the sample on the
same page shows, so the sentence contradicted the section above it and read as
though checking identifiers in were acceptable. The tension it described has
since been settled deliberately in review, so the page records that rather
than inviting a reader to revisit it.

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

* fix(e2e): keep the Forge access path out of logs, and address review findings

The jump host and Teleport join token were repository variables in the
job env, which GitHub prints in every step's log header; the one mask
came too late to cover the earlier steps. Read them from repository
secrets instead, and scrub the jump host from the uploaded run log and
JUnit report, which no mask reaches.

Also, from CodeRabbit's review of #1152:
- decode an environment's provider block strictly, like the top level
- turn signing off for the test repository's commit and tag
- match uppercase hostname labels and scan binary files as text in
  internal-config-check
- correct three triage statements about artifacts, pre-lane failures and
  unfinished cloud-init

---------

Signed-off-by: Ron Compos <rcompos@nvidia.com>
2026-10-01 07:24:40 -06:00
Miancheng Lin b6a25000fa refactor(restapi)!: nest provider fields under nico and infra payload (#246) 2026-09-04 12:28:43 -06:00
nhammernik 7ce92b69ce feat: import cloud-workflow-engine (#7) 2026-08-05 16:25:10 -06:00