133 Commits
Author SHA1 Message Date
patelpayal 28a8010cab chore(os-image): drop Kubernetes 1.34.2 after staging 1.37 (#2276)
Signed-off-by: Payal Patel <payapatel@nvidia.com>
2026-12-01 14:34:50 -07:00
Abhay Krishna b28d4f13d1 test(e2e): scan nico-vms clusters after upgrade and scale (#2417)
The CIS scan ran only on fresh clusters, so nothing showed whether a
cluster still passes once its control plane is upgraded or its node
pools grow. Two nico-vms entries now scan again at those points,
against the same exception register:

- "nico-vms k8s upgrade" scans after creation, on 1.35.3, and again
  once the upgrade to 1.36.3 has replaced its control plane.
- "nico-vms" scans after creation and again while its worker pool is
  scaled up. The scale step is split into "scales the node pools up"
  and "scales the node pools back down", so the scan runs while the
  added node is in the cluster.

Both clusters are now created encrypted at rest, as CAPD core is, so
the scans check the encryption configuration NVKE renders (1.2.27,
1.2.28) rather than report its absence. The upgrade entry therefore
upgrades an encrypted cluster, which no lane did before.

Both entries are happy-path, which the NICo VMs lane runs. Their tenant
nodes boot the NVKE FDE node image, so these are the first scans of
that image. The lane now passes -e2e.artifacts-dir, inside the state
directory it redacts and uploads, so the scan results are kept.

The tenant scan takes the point in the cluster's life it runs at, which
names its spec and its results directory, kube-bench/<cluster>/<phase>.

Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
2026-11-23 16:19:18 -08:00
Abhay Krishna 0493582197 test(e2e): scan CI clusters with kube-bench (#2156)
Scan the clusters the CAPD and bootstrap e2e lanes build with
kube-bench, and fail the lane on any FAIL or WARN the exception
register does not cover, or on an entry for a check kube-bench does
not report.

The scan runs the kube-bench v0.16.0 image as published, with
cis-1.12, the newest benchmark it ships. The release maps no
Kubernetes version after 1.34, so the scan names the benchmark rather
than rely on kube-bench falling back to it.

A scan runs the policies checks first and alone, in a pod that takes
nothing from the host but the admin kubeconfig and runs as a service
account that mounts no token, so section 5 does not report the scan
itself. It then runs one pod per node, reads each report from its
log, and deletes everything it created. A policies report whose
audits returned no rows is an error, not a list of findings.

NVKE now sets kube-controller-manager's --terminated-pod-gc-threshold
to 12500, Kubernetes' own default, on every cluster it creates. The
scan's check 1.3.1 looks for the flag; setting the default explicitly
satisfies it without changing how many finished pods a cluster keeps.
Existing clusters keep the configuration they were created with. Like
the other flags NVKE sets, a cluster-create request cannot override it
through extraArgs.

The register, exceptions.yaml, lists each accepted check by ID, with
a title and a reason in our own words. An entry applies on every node
of every cluster. One whose check passed on every node is listed as
unneeded, since the other kind of cluster may still need it.

The CAPD lane scans "CAPD core" on pull requests and "CAPD with etcd
encryption" on full runs, once their nodes are ready, and copies the
results out with its diagnostics, as the local entrypoint runner now
does too. Both create encrypted clusters, so the scan checks the
encryption configuration NVKE renders; CAPD core now creates one. The
bootstrap lane scans the site cluster in stage 4d of run.sh; a scan that
failed or never reached a verdict fails the run after the teardown, and
the workflow uploads the results on every provisioned run. The substrate
now mounts its etcd tmpfs with mode 0700, the mode kubeadm gives the
directory it creates, instead of tmpfs's default 1777.

The CAPD node image, which the bootstrap image builds on, now creates
the etcd user and, at every boot, gives it /var/lib/etcd, as the
production node image does; the node containers mount a root-owned
tmpfs there. The scan pods mount each host's /etc/passwd and
/etc/group, so kube-bench names the directory's owner as the host does:
its own image has no etcd user and reported UNKNOWN:UNKNOWN. Check
1.1.12 then passes on the CI clusters and on production nodes.

Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
2026-11-19 13:58:56 -08:00
Alex Pelavin f41e9b693c ci: version and release every component by the bare vX.Y.Z tag (#2164)
* ci: version every artifact by the bare v* describe

Every published artifact is now versioned by
`git describe --tags --always --match 'v*' "${GITHUB_SHA}"`, with no
component prefix, so component versions follow the nvke tag rather than
moving independently. The controller image, chart, provisioned provider
image, agent binaries and packages, nvkectl and the OS image resolve
their version this way, and the version is passed to each build so the
binaries report the same version they are published under.

The release registry describes and resolves components against the
bare v* tags, so a beta qualifies the artifacts its tag published.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: build and publish every component on a bare vX.Y.Z tag

Every component build that a vX.Y.Z-beta.N tag runs now runs on a bare
vX.Y.Z tag too: the controller and provisioned provider images, the
controller chart, the agent binaries and packages, the OS image and
nvkectl. The gates that admitted only beta tags admit any bare v* tag,
and nvkectl is versioned by the bare describe for both.

Beta-only behaviour is unchanged: a beta still skips DSX, stays out of
the apt index and bakes non-FDE images only. A release does all three.
promote-dsx now runs on vX.Y.Z, so it tags DSX with the bare describe
the NVCR copy was published under.

The beta flag in tag-publish.yml is removed, so nvkectl is published to
GHCR for every tag it is built for, betas included. cli-artifact.yml
versions it by the bare describe.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* build: version every module by the bare v* describe

The Makefiles, the root cmd_version and the scripts that derive the
agent version described against component tags (agent/v*, controller/v*,
cli/v*, os-image/v*, cluster-api-provider-provisioned/v*,
management-engine/v*). They now use
`git describe --tags --always --dirty --match 'v*'`, the version the
publish workflows already stamp, so a local or CI build reports the same
version as the artifact published from that commit.

The fallbacks for an untagged checkout and a build outside git are
unchanged, as is the agent's 0.0.0- prefix for an untagged .deb. The
e2e VALIDATE_VERSION now pairs with the nvke-validate image, and the
comments and log lines that named the old describe are updated.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* docs: describe one vX.Y.Z tag releasing every component

Components are no longer tagged on their own. The release docs, the
module AGENTS.md and README files and SECURITY.md now say one signed
vX.Y.Z tag releases the repository and every component built from it,
versioned by `git describe --tags --always --match 'v*'`.

docs/artifact-publication.md lists what each workflow publishes for a
release and for a nightly beta, and that an RC publishes nothing of its
own. The prefixed tag instructions, and the go get example that relied
on them, are removed. Mentions of past component tags that remain true
as history are kept.

The qualification docs and the qualify-e2e resolution input now say a
release, an RC and a beta are all qualified with commitDescribe, which
describes the commit the version marks and so resolves every component
to it. gitTag takes the highest v* tag in the repository and is not for
qualification.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: stop publishing artifacts from component release tags

A component release tag (agent/vX.Y.Z, controller/vX.Y.Z,
cluster-api-provider-provisioned/vX.Y.Z, os-image/vX.Y.Z, cli/vX.Y.Z) no
longer starts a publisher; a release is a bare vX.Y.Z tag. Component
release candidate tags still start the same workflows as before.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: publish every GHCR release artifact on vX.Y.Z

agent-artifact.yml, chart-publish.yml and image-validate-nvcr.yml only ran
on component tags, so a release published none of them. Each now runs on a
bare vX.Y.Z tag and versions by the bare v* describe. The controller and
provider GHCR promotions and the agent .deb GHCR push also run on vX.Y.Z
(not betas), since they were gated on component tags too and the GHCR
chart waits for the controller image there.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: name every tag build by its describe version, not the tag

The publishers versioned the build by the bare v* describe but still took
version aliases, GHCR promotion tags, the agent .deb version, the nvkectl
S3 release path and the os-image version from the tag name. On a component
RC tag the two disagreed, and on a vX.Y.Z tag agent-deb's GHCR push would
have been tagged with the commit SHA. Every one now uses the describe
version, which on the tagged commit is the tag itself.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: pass the describe version to build commands through the environment

The version is git describe output, which a tag name controls. It was
interpolated with ${{ }} into the run script of six build steps, so a tag
containing shell syntax would have run in jobs that hold registry
credentials. Each step now reads it from an environment variable.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: give component RC tags no version alias

A component RC tag still starts the agent and nvkectl publishers, and
they name the build by the bare v* describe. On a commit that already
carries a release tag that is the release's version, so the RC run would
move the release's alias to a new manifest. Only a bare v* tag now adds
the version alias; a component RC tag publishes sha-<commit> only.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: resolve every publisher's version through one checked script

Every publisher resolves its version through
release/hack/describe-version.sh instead of calling git describe itself.
A bare v* tag run is published under its own tag; any other run under
the v* describe. Before anything is pushed, the script refuses:

- a describe that is not a v* release, RC or beta, its describe suffix,
  or a bare commit. The describe can name any v* tag on the commit, and
  agent/Makefile passes it to the shell inside -ldflags.
- on a v* tag run, a tag that is not a version or does not name the
  commit being built.
- on a component tag run, a commit a v* tag already names. Its describe
  is that tag, so a component RC there would republish that tag's
  .debs, images, charts and nvkectl.

Naming a tag run by its tag rather than the describe matters when the
commit carries several: git describe prefers the annotated release, and
of two lightweight betas the first by name. A beta re-run on a released
commit, or a second beta on one commit, now publishes under its own
version instead of another tag's.

release/hack/test_describe_version.py covers these cases against fixture
repositories, and runs with next-tag-test in the merge gate.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: let only a release version into the apt index and GHCR

agent-deb-publish.yml chose whether to update index.json, and whether to
push the .debs to GHCR, from the ref: anything but a beta tag did both.
An agent/v* RC tag carries no -beta., but its packages are versioned by
the describe, so on a commit past a beta it made that build installable
from apt and pushed it to GHCR.

The build job now reports whether its version is a bare vX.Y.Z, and both
follow that instead. A release enters the index and GHCR; a beta, a
component RC and anything else is uploaded under releases/<version>/ and
pushed to NVCR only.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: stamp the published version into standalone nvkectl builds

A dispatched cli-artifact, cli-artifact-nvcr or cli-s3-publish run with no
dist_artifact builds nvkectl itself. The build took its version from the
Makefile's own git describe, which on a commit with a beta and a signed
release names the release, while the run publishes under the beta it was
dispatched from. Pass the resolved version as NVKECTL_VERSION, as
tag-publish.yml already does, so the binary reports the version it is
published under.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: skip a beta dispatch of the GHCR chart publisher

A beta's controller image is never promoted to GHCR, so a chart-publish.yml
run dispatched from a beta tag waited up to 30 minutes for an image that
would not appear, then failed. Skip beta refs, as the automatic beta trigger
already does.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* test: cover the triggering-tag check and a bare RC in describe-version.sh

Every invalid tag in the existing test was also the commit's describe, so
the describe check refused it before the check on the triggering tag ran,
and disabling that check left every test passing. Tag the bad names beside a
valid signed release, which wins the describe, so only the tag check can
refuse them.

Also pin that the helper names a bare RC run by its tag: the publishers'
tag filters, not the helper, keep an RC from publishing.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

* ci: recover a vX.Y.Z agent package release by dispatch

A failed agent/vX.Y.Z publish could be recovered by dispatching Agent Deb
Publish from that tag with ref set to it. Releases are now vX.Y.Z, which the
ref check refused, and a SHA got past it only for every publish job to skip,
since their bare-tag arm requires a push.

Accept a vX.Y.Z ref when the run is dispatched from that same tag, and let
it into the apt intake, GHCR and NVCR jobs. The tag names the run's version,
so the index.json and GHCR gates still admit only a release. A beta is not
admitted, as before.

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>

---------

Signed-off-by: Alex Pelavin <apelavin@nvidia.com>
2026-11-16 10:05:29 -06:00
Vineeth Bandi c65ced3dca chore: remove the in-tree NKTP chart (#2300)
Signed-off-by: Vineeth Bandi <vbandi@nvidia.com>
2026-11-13 12:33:42 -06:00
Abhay Krishna ba862e2f62 test(e2e): move CI and dev defaults to 1.36 (#2132)
Moves CI and local development off Kubernetes 1.34, which reached end
of life on 2026-10-27.

The CAPD node image's kindest/node base, which supplies the kubelet
and kubeadm of every container node, moves from v1.34.8 to v1.36.4.
kubeadm deploys a control plane at most one minor version older than
itself, so every cluster version on that base moves with it: tenant
defaults to 1.36.3, and site clusters and the control-plane roll
target to the base's 1.36.4.

The other 1.34.2 defaults move to 1.36.3: the nico-vms entries, the
sample scripts and Tilt buttons, the nvkectl smoke suite and the kind
smoke lane's site spec. The upgrade test starts at 1.35.3 and upgrades
to 1.36.3, and the no-VIP spec, which took its target from that chain,
asks for the roll target instead. The e2e kubectl image moves to
alpine/k8s 1.36.4. The local development channel keys its release
under "1.36".

Implements part of #2041.

Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
2026-11-05 12:47:55 -07:00
Aaron Patten 55b2a0029a refactor(dev)!: remove the deprecated CWE_* and NKE_CONTROLLER_* setting names (#2114)
* refactor(dev)!: remove the deprecated CWE_* and NKE_CONTROLLER_* setting names

The controller's development, test and build settings read only their
NVKE_CONTROLLER_* names now. The CWE_* and NKE_CONTROLLER_* aliases,
deprecated since v0.23.0, are gone from the Makefiles, Tiltfiles, hack and
CI scripts, the e2e framework and tests, and the docs. So are CWE_IMAGE
(use CONTROLLER_IMAGE), the cwe_image key in tilt_config.json (use
nvke_controller_image), --cwe-api in get-kubeconfig.sh (use
--controller-api) and the cwe-name input of qualify-e2e.yml (use
controller-name). local-backend-e2e.sh reads LOCAL_NVKE_CONTROLLER_IMAGE
instead of LOCAL_CWE_IMAGE.

BREAKING CHANGE: a value set under an old name, in .env, .env.tilt,
tilt_config.json, a shell profile or a repository variable, is now ignored
without a warning. Rename CWE_X and NKE_CONTROLLER_X to NVKE_CONTROLLER_X,
except CWE_API (use NVKE_CONTROLLER_API_URL) and CWE_IMAGE in
make -C cli images (use CONTROLLER_IMAGE). Rename LOCAL_CWE_IMAGE to
LOCAL_NVKE_CONTROLLER_IMAGE and the cwe_image key to nvke_controller_image.
get-kubeconfig.sh rejects --cwe-api (use --controller-api), and
qualify-e2e.yml has no cwe-name input (use controller-name).

Signed-off-by: Aaron Patten <apatten@nvidia.com>

* ci: fail when a removed controller setting name comes back

make name-check, which the merge gate runs, now also runs
hack/removed-settings-check.py. It fails on any removed CWE_* or
NKE_CONTROLLER_* setting name, LOCAL_CWE_IMAGE, cwe_image, --cwe-api or
cwe-name in a tracked file, so a branch cut before the removal cannot bring
a reader of an old name back. CHANGELOG.md is not scanned, and two
look-alikes that are not controller settings are allowed by file.

Signed-off-by: Aaron Patten <apatten@nvidia.com>

---------

Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-11-04 12:29:02 -05:00
Terry Howe 8eed5173c8 feat(deploy)!: move the greenfield overlays and the release namespace to nvke-controller (#1889)
* feat(deploy)!: move the greenfield overlays and the release namespace to nvke-controller

This moves them, and with them the persisted identifiers a site carries:
the Helm release and its namespace, the database, and the Temporal
namespace and task queue.

In the three greenfield stacks: nameOverride, fullnameOverride,
namespaceOverride, serviceAccount.name, serviceMonitor.name,
appDb.dbName, the Temporal namespace and queue, the field managers and
the managed-by values, tracing.serviceName, and the objects the stacks
render around them -- the Namespace manifest, the Postgres CREATE
DATABASE, the SPIRE admin ID and ClusterSPIFFEID namespace selectors,
the auth-dev ConfigMap's namespace, the CAPD RBAC ClusterRole and its
subject, and the spire-client probe URL.

Consumers that move with it: controller/Tiltfile (release name,
namespace, SPIRE admin path and the string-matched resource names),
deploy/check-site.sh, the e2e site helpers and their collect script,
cli/internal/bootstrap/controllerdeploy (including the NodePort Service
nvke-controller-external), cli/internal/deploypath's admin path,
management-engine/hack/nvke-controller.sh, and the CI lane scripts.

The discovery paths search the new name first and keep the old one:
nvkectl's authConfigNamespaces, nvke-token.sh, nvke-auth-demo.sh and
dev-env-spire.sh now try nvke-controller, then nke-controller, then
cloud-workflow-engine. The reference health dashboard matches all three
workload names, and Tilt's preflight refuses to take over a cluster
that still runs the nke-controller release rather than failing later.

The published image keeps its name per #1554 decision 2, as do the
nke-controller-config ConfigMap and the nke-controller-chart release
artifact; hack/name-check-allowlist.txt now carries one entry per
reason rather than one blanket token.

Refs #1861, #1554, #1496, #1818

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: address review feedback

Name nke-controller as the intermediate namespace in the authentication
docs, matching authConfigNamespaces, and restore the legacy node-agent
audience in the exchange mock's test.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: address review feedback

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix(e2e): point the nico bootstrap lane at the nvke-controller namespace

The nico lane still asserted the tenant credentials Secret landed in
nke-controller, so both e2e (nico) jobs failed after the rename.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix(deploy): carry the nvke-controller rename into the rebased files

The rebase onto main replayed the rename over two files that gained
nke-controller references after the branch was cut: the management-engine
dev overlay, which succeeds the hack script this branch had edited and
was removed in #1918, and an API-authentication example added in #1935.

Refs #1861

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: address review feedback

Continue namespace discovery past a Forbidden lookup in nvke-token.sh and
nvke-auth-demo.sh. --ignore-not-found suppresses absence, not denial, so a
kubeconfig scoped to nke-controller alone died on the nvke-controller probe
before reaching the namespace it can read -- the migration case this branch
adds. Keep the first denial, try the remaining candidates, and fail with it
only when none was readable, since falling back to cloud-workflow-engine
needs a confirmed absence.

Refs #1861

Signed-off-by: Terry Howe <thowe@nvidia.com>

---------

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-29 08:17:40 -06:00
Abhay Krishna e7ebbc4b1b feat(controller): read chart-rendered API authentication from nvke-controller-config (#1812)
When the chart renders the API authentication configuration
(apiAuth.configMap.create), the controller now reads it from an apiAuth
section of nvke-controller-config instead of the file at
AUTH_CONFIG_PATH. auth/authn stays the only owner of the schema: the
section reuses authn.Issuer and is validated with the new
Config.ValidateStartup, which authn.Load also uses.

The section is required and carries an explicit enabled switch, so a
missing section is a startup failure rather than "off". A section
filled in but switched off is refused, and enabling it while
AUTH_CONFIG_PATH is set is a startup failure. A ConfigMap managed
elsewhere keeps the AUTH_CONFIG_PATH path, and the chart still renders
the authentication ConfigMap for nvkectl and extraFiles.

The CAPD e2e lane moves to the chart-rendered configuration; Tilt and
capnico-e2e keep the external ConfigMap, so CI covers both. The e2e
suite and the token and demo scripts treat either source as
authentication being on, whichever name the settings ConfigMap has.
The auth-mode gauge now follows whether authn.Setup built an
authenticator.

Also renames the remaining references to the settings ConfigMap,
nke-controller-config, to nvke-controller-config, the chart's default
since #1769, in docs, comments, test messages and help text. Kept: the
legacy pins and fallbacks for installs that predate the rename, and
the "Loaded nke-controller-config" startup log line, which the e2e
OIDC site helper matches and released images still print.

Includes the design doc,
controller/docs/api-auth-in-controller-config-design.md.

Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
2026-10-23 16:33:27 -07:00
Aaron Patten 68c0294c0a refactor(dev): rename the controller's NKE_CONTROLLER_* dev and test settings to NVKE_CONTROLLER_* (#1771)
The NVKE controller's development, test and build settings now use the
NVKE_CONTROLLER_* prefix that AGENTS.md sets for settings that name the
controller. The deployed controller reads none of them.

Where a developer sets a value (Tiltfiles, Makefiles, hack and CI entry
scripts, the e2e, gofail and integration test readers), the old
NKE_CONTROLLER_* name is still read after the new one and before the
existing CWE_* alias. #1399 removes both. Where our own scripts hand a
value to another script, to Tilt or to a test, the writer and the reader
both use only the new name.

Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-21 08:17:38 -07:00
Davanum Srinivas b200d62841 ci(e2e): collect the capnico controller log and NicoMachine objects (#1815)
The 2026-10-19 nico-e2e red (run 39255127544) could not be root-caused from the collected diagnostics. The provider's view of the lost instance lives in the CAPNICo controller log and the NicoMachine objects, which were not collected.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-20 05:52:13 -04:00
Jonathan MeierandClaude Opus 5 1697fa157b docs: remove the manual management-plane install path (#1784)
The published documentation carried two ways to install the management
plane: the hand-run `deploy/check-site.sh` and `deploy/nvke-deploy.sh`
procedure, and the local-site flow added in #1725. This removes the first
and leaves the second as the only documented path.

Deletes docs/operate/install-management-plane-services.md, which was the
manual procedure end to end, and its entries in docs/index.yml and
docs/README.md. Seventeen pages named it as a prerequisite; each now points
at Run NVKE end to end on one machine.

Rewrites the install commands in Secure the NVKE API, Configure OIDC for
workload clusters and cli/docs/user-flow.md onto
`deploy/nvke-deploy-local.sh install`, which takes the same pass-through
flags and reads its inputs from the NVKE_* variables env.sh exports.
Removes the `deploy/check-site.sh` references from Troubleshoot, Supported
platforms, the NKTP pages and cli/docs/sitespec.md.

No script is removed or changed in behaviour. deploy/check-site.sh,
deploy/nvke-deploy.sh, deploy/nvke-deploy-local.sh and deploy/nico stay as
they are; local-site runs on them. Two script comments that named the
deleted page now name the local-site page.

Signed-off-by: Jonathan Meier <jomeier@nvidia.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-19 15:49:32 -04:00
Davanum Srinivas c445686779 ci(os-image): publish main's bakes under main-sha- and read both aliases (#1790)
After #1783 the schedule still published sha-<commit>, so it could still move a tag bake's alias and it rebuilt what the main push had built; the NICo VMs lane and the GHCR prune read sha- only. Every run on main now publishes main-sha-, and the skip check, the lane and the prune accept both prefixes.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-19 15:47:27 -04:00
Aaron Patten 5c86b4879d refactor(dev): name the controller's Tilt resource nvke-controller (#1770)
The controller's Tilt resource is nvke-controller and its build step is
nvke-controller-compile. tilt_config.json sets the controller image with
nvke_controller_image, and Tilt providers return controller_resource_deps,
controller_env_overrides and controller_chart_flags. The cwe_image key and
the cwe_* provider fields are still read for one release, with a warning.

Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-19 10:37:26 -07:00
Terry Howe e34e07e355 feat(chart)!: default the controller chart names and SPIFFE service path segment to nvke (#1769)
* test(chart): assert default, legacy-pinned and greenfield renders separately

chart-identity-assertions.py asserted the legacy names against the default render, so moving a default and keeping an existing install on its names could not be told apart. It now renders three scenarios, each with its own expectations: the chart's defaults, hack/testdata/chart-legacy-pinned-values.yaml, and a renamed greenfield install.

A default that moves now changes DEFAULT only. A pin that stops holding the old name fails the legacy-pinned render. The management namespace check is folded into the scenarios, and every check runs so a failure shows which render it was.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* feat(chart)!: default nameOverride and the controller config ConfigMap to nvke-controller

A new install now gets nvke-controller for the Deployment, Service and every object named from the fullname, and nvke-controller-config for the settings ConfigMap. The ServiceAccount, the ServiceMonitor and the nke-rbac objects keep their names; they move separately.

BREAKING CHANGE: an install that predates this must set nameOverride to cloud-workflow-engine and controllerConfig.name to nke-controller-config before it takes this chart. The Deployment's spec.selector is immutable, so an upgrade that moves nameOverride fails, and the ConfigMap rename orphans the live object. hack/testdata/chart-legacy-pinned-values.yaml lists the pins.

The default scenario of chart-identity-assertions.py moves to the new names and the legacy-pinned scenario does not. The chart scripts, the chart test and the e2e helpers that select the ConfigMap by name follow the default; nvke-auth-demo.sh takes it from NKE_CONTROLLER_CONFIGMAP.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* style: gofmt map literal alignment in oidc site_test

Signed-off-by: Terry Howe <thowe@nvidia.com>

* feat(chart)!: default the SPIFFE service path segment to nvke-service

A new install issues the controller the ID spiffe://<trust domain>/nvke-service/<service account>: the chart's default RBAC subjects, the ClusterSPIFFEID and the SPIRE admin ID now agree on nvke-service. The CLI bootstrap, the deploy path, the e2e stacks, Tilt and the e2e helpers that name the controller's ID follow.

BREAKING CHANGE: an install that predates this must set spiffe.servicePathSegment to nke-service and keep its ClusterSPIFFEID and SPIRE admin ID on /nke-service/. Node agents from before the nvke rename admit only that path, and the controller dials every node with one SVID, so moving it on such a site breaks controller-to-node mTLS.

chart-identity-assertions.py checks each scenario's SPIFFE subjects against its segment: nvke-service by default, nke-service in the legacy-pinned render.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: address review feedback

Name the auth demo's controller ConfigMap setting NVKE_CONTROLLER_CONFIGMAP, the prefix AGENTS.md requires for settings that name the controller. Show the default SPIFFE subjects in the chart README under spiffe.servicePathSegment instead of a fixed /nke-service/.

Signed-off-by: Terry Howe <thowe@nvidia.com>

---------

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-19 11:34:48 -06:00
Davanum Srinivas 63794b0275 chore(os-image): fetch ovn-kubernetes over git and drop the read-only token (#1735)
bundle.sh fetches the pinned commit with git, and the lock pins its tree hash instead of a generated tarball checksum. The workflows no longer pass OVN_KUBERNETES_RO_TOKEN.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-17 22:23:48 -04:00
Terry Howe 6e8871aa40 feat!: make the management namespace configurable and default it to nvke-system (#1698)
* feat(controller): make the management namespace configurable

The shared management-plane namespace was the compile-time constant
constants.NamespaceNVKESystem. It is now the nke-controller-config key
managementNamespace, read through config.Config.ManagementNamespaceOrDefault
and threaded to what addresses that namespace: the tenant-access publish and
Secret-reconcile paths, the nke-rbac read, the CAPI cluster and machine
activities, failure-domain discovery, the Teleport token controller, the OIDC
rollout operation and the Secret cache the manager builds.

An unset key resolves to nke-system, which is what a config.yaml written before
the key existed decodes to, so a controller upgrade alone never moves a site.
The old constant is renamed LegacyManagementNamespace to say which of the two
it is.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* feat(chart): default the management namespace to nvke-system

nvkeSystemNamespace.name is new and defaults to nvke-system. One helper,
controller.managementNamespace, feeds the Namespace object, the nke-rbac
ConfigMap, the Role and RoleBinding scoped to it and the managementNamespace
key the controller reads, so the grant and the namespace it covers cannot
drift apart.

This moves the default a new install gets. The old namespace is not also read,
so a site installed before the value existed must pin nvkeSystemNamespace.name
to nke-system before it upgrades; the chart README says so and
chart-identity-assertions.py now renders that pin and asserts every object and
the controller config land on it.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* feat(cli): read kubeconfig Secrets from a configurable namespace

nvkectl get kubeconfig reads nvke-system and then nke-system, so it finds the
Secret whether or not the site has pinned the old management namespace, and
--namespace names one outright. The error from a miss names the last namespace
searched rather than reporting only the first.

The bootstrap engine installs the chart with default values, so its own
constant moves to nvke-system with the chart default.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* chore: move the greenfield deploy, e2e and docs to nvke-system

The base-config Namespace manifests, Tilt, the e2e lanes, the CI helper scripts
and the user-facing docs all name the management namespace. They describe a new
install, so they follow the chart default. Nothing here is read by a site that
has pinned nke-system.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: address review feedback

fix: address CI failures
Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: address CI failures

The CLI falls back from nvke-system to nke-system and its not-found error names the last namespace tried, so the smoke test accepts either.

Signed-off-by: Terry Howe <thowe@nvidia.com>

---------

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-16 20:23:38 -04:00
Davanum Srinivas 8bdc2654fa fix(e2e): drop ovnkube-node resources, not only requests, in the nico-vms runbook (#1709)
* fix(ci): capture the tenant's pods and events in the NICo VMs diagnostics

The guest capture now lists every pod and container on the node, the kubelet's pod adds and admission lines, and from a control plane the tenant's nodes, pods, ovn-kubernetes workloads and events. The tenant diagnostics report is copied from where the suite writes it.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

* fix(e2e): drop ovnkube-node resources, not only requests, in the nico-vms runbook

The v2.4.2 chart sets limits, so removing requests alone defaults them to the limits (3 CPU, 4.3 GiB per pod) and the replacement pods never schedule on the e2e VMs. One add per container, a no-op on the later joins.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

---------

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-16 16:07:54 -04:00
Aaron Patten a037fc56e1 refactor(dev): name the dev kind cluster controller-capi, with trust domain controller-capi.nvke.local (#1700)
make capd-up and tilt up stop with delete instructions when they find the old cwe-capi cluster. The five places that derive the trust domain from the kind cluster name move to .nvke.local together, so Tilt, CI and the e2e harness agree.

Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-16 15:37:55 -04:00
Cullen McDermottandClaude Opus 5.5 17b46e8e17 fix(ci): pull the OVN image's ubuntu base through the Docker Hub mirror (#1714)
The CAPD, NICo and DSX identity exchange e2e lanes build the OVN image
through the ARC runners' dind daemon, which has no Docker Hub mirror. Its
pinned ubuntu:26.04 base was the lanes' last anonymous docker.io pull and
returned 429 whenever several lanes built at once.

cni-ovn/bundle.sh now routes that base through CNI_DOCKERHUB_MIRROR, the
variable bundle-lib.sh already honours for the locked images, and
prepare-ovn-assets.sh sets it from NKE_E2E_DOCKERHUB_MIRROR. The digest
pins the same image on either route.

Signed-off-by: Cullen McDermott <9535761+cullenmcdermott@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:04:44 -06:00
Aaron Patten e062eefb9e refactor(nico-sim): rename the nico-vms bridge to controllerbr0 (#1697)
nico-vms in bridge mode now creates controllerbr0 instead of cwebr0. The
default changes in nico-sim's config, the setup, teardown and dnsmasq
scripts, the CI host scripts, both E2E workflows and the docs.
setup-linux.sh reads NICO_VMS_BRIDGE_NAME like the other scripts.

remove-legacy-bridge.sh removes a cwebr0 that an older nico-vms left
behind: its dnsmasq, every iptables rule that names it, the bridge, and
its /etc/qemu/bridge.conf line. Both setup scripts run it before they
create the bridge, and both teardown scripts after they remove it. It
does nothing when cwebr0 is the configured bridge.

The dnsmasq pkill patterns no longer match their own sudo process, and
the config.go line references in test/kubeadm point at the current lines.

Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-16 13:26:43 -04:00
Davanum Srinivas 5e7267a6f5 feat(os-image): build OVN from dsx-ai-factory/ovn-kubernetes v2.4.2 with pod hostPort (#1694)
* feat(os-image): pin OVN to the fork's v2.4.2 and enable pod hostPort

The stream is now the fork's release tag and the lock pins its commit. values-nke.yaml sets global.enablePodHostPort; the agent clears it on container nodes, which run the local gateway.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

* chore(qualify): qualify the 2.4 OVN stream

The node image carries the fork's 2.4.2 packages after #1694, so the plan takes the highest 2.4 the apt suites serve.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
(cherry picked from commit 0384e4a375)

* ci: free disk before the package reproducibility builds

cni-ovn's double build used 7.6 GB of the 13 GB a fresh ubuntu-latest runner had free; a fuller one died with "No space left on device" on pull-request/1694 at 13:23Z 10-16.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
(cherry picked from commit 6fc0e7990ab96fa9eb0e91ef6e04a635e5917f17)

---------

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-16 11:42:52 -04:00
nko-cpuandClaude Sonnet 5.5 9f163d42e3 feat(os-image): build the OVN debs from dsx-ai-factory/ovn-kubernetes (#1560)
Build the nvke-cni-ovn charts and images packages from the NVIDIA fork at a
commit the lock pins (release-1.6.0) instead of pulling upstream artifacts,
and make 1.6.0 the default stream.

- bundle.sh fetches the fork tarball with OVN_KUBERNETES_TOKEN (or
  GITHUB_TOKEN), verifies it against the lock, writes values-nke.yaml and
  builds localhost/nvke/ovnkube:<commit12> with docker buildx, nerdctl or
  podman. The lock pins source and tarball sha256; amd64 and arm64 must pin
  the same commit. Base images are pinned by digest and the built archive is
  cached in DIST_DIR.
- The fork's Dockerfile.ubuntu is patched in a copy for three gaps its chart
  hits: the node liveness and readiness scripts are not copied (kubelet killed
  ovnkube-controller every two minutes), firewalld is missing, and the iptables
  wrappers chroot /host, which the chart never mounts.
- nvke-agent uses global.imageRepositoryPrefix and global.gatewayOptions, runs
  OVN in local gateway mode on container nodes (--allow-no-uplink needs it and
  the chart hard-codes shared), and skips value files the chart no longer ships.
- Default stream 1.4.0 -> 1.6.0 across the agent, controller, OpenAPI, protos,
  docs and e2e scripts; the DB migration keeps 1.4.0 for existing rows. The
  nico-vms release fixtures and create-forge-nico-cluster.sh install 1.6.0.
- CI passes OVN_KUBERNETES_RO_TOKEN to the jobs that build cni-ovn. The nico-vms
  diagnostics capture ovnkube container logs and the tenant report.

Signed-off-by: Noah Kontur <nkontur@nvidia.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 09:11:48 -04:00
Davanum Srinivas 87580fcb7c fix(e2e): retry the host image build after a Go proxy stream reset (#1687)
build_with_retry retried only the mirror 404; a proxy.golang.org stream reset mid-module-download fails the controller image build the same way and |direct does not cover it (CAPD arm64 on f520e100a, 20:23Z 10-14).

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-16 08:53:05 -04:00
Aaron Patten e19274429e chore(controller): say controller, not CWE, in the settings-rename files (#1653)
Comments, help, log and error text in the files the CWE_* settings rename
owns say "the controller". Every deprecated CWE_* alias statement cites
#1399, which removes them, so `git grep '#1399'` finds every alias site.
No behaviour change.

Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-16 07:58:55 -04:00
LiaandClaude Fable 5.1 8bcb48d4f9 feat(cli): the stack install reads a stack config file (#1682)
* feat(cli): the stack install reads a stack config file

The controller stack install takes its site-specific input from a JSON
file of its own, the stack config, loaded by the new
cli/internal/deploypath/stackconfig package: the NICo API and the optional
image overrides and mirror. The file is decoded strictly through
sigs.k8s.io/json, so an unknown, duplicate or differently cased key is
refused, as are a REPLACE_* placeholder, an empty required value, a null
object, an endpoint without a scheme or with a user and password, and a
mirror with a scheme. Every problem is reported at once as
"<json path>: <problem>", a stray key beside the value problems.

The credentials stay in the environment and move to the same package:
NVKECTL_NICO_TOKEN, NVKECTL_NODE_USER, NVKECTL_NODE_PASSWORD and
NVKECTL_DATABASE_PASSWORD are the stack install's input, not the site
spec's.

The site spec carries the bootstrap's fields only: the site name, the
control-plane VIP, the SPIRE trust domain and CA. The render reads both
files, --sitespec with --stack-config and neither without the other, and
takes the nodes' architecture from --arch, validated, for both the release
artifacts and the SPIRE TPM attestor checksum; without the flag the host's
architecture is used with a warning.

nvkectl inspect stack-config, a hidden reader like inspect sitespec,
validates the file and the credentials and prints STACK_CONFIG,
STACK_NICO_ENDPOINT and STACK_NICO_ORG_ID for the install scripts.
validate sitespec checks the site spec and prints "valid"; inspect
sitespec prints the three site facts. deploy/examples/stack-config.json is
the operator's starting point.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* feat(deploy): the scripts take --stack-config and read the node architecture

check-site.sh and nvke-deploy.sh take the stack config beside the site
spec and refuse one without the other. Both start with an inputs line
that names the two files, the site and the NICo endpoint. The check
validates the stack config and the NVKECTL_* credentials through
nvkectl inspect stack-config and fails on nodes that report two
architectures or none. The executor reads the architecture from the
cluster and passes it to the render as --arch; --arch on the executor
stands in for the read, and a dry run with an unreachable API renders
for the host. The kind lane fills a stack config template next to the
site spec template. The deploy READMEs and the cli docs describe the
file.

Co-developed-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* docs(operate): the install reads a stack config file

The install page gets a "Write the stack config" section with the
credentials step, the example file and every key. The inputs table,
the artifact-source table, the check and install commands, the
troubleshooting entries and the pages that link to the section follow.
The node architecture is read from the cluster, so no page asks for it.

Co-developed-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

---------

Signed-off-by: Lia Campbell <liac@nvidia.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-15 17:54:58 -07:00
Abhinav Pandey 1ededf3bce refactor(cli)!: read site credentials from the environment and drop unused site spec fields (#1644)
The site spec describes the site, so it can be committed and used unchanged
on any machine. Credentials and machine-local file paths now come from the
environment of the command that needs them, and fields nothing consumed are
removed. A spec that still sets a removed field fails to load, and
generate sitespec --set refuses it, naming the replacement.

- spire.caCertFile/caKeyFile -> NVKECTL_SPIRE_CA_CERT_FILE/_KEY_FILE, with
  spire.upstreamCA: true recording that the site uses the CA; with it every
  run requires the variables, so none falls back to a self-signed root
- SPIRE_CA_CERT_FILE/SPIRE_CA_KEY_FILE are refused, naming their replacements
- controllerStack.nico.tokenFile -> NVKECTL_NICO_TOKEN
- controllerStack.tenant -> NVKECTL_NODE_USER, NVKECTL_NODE_PASSWORD
- controllerStack.database.passwordFile -> NVKECTL_DATABASE_PASSWORD; the
  render no longer generates and writes a password file, and the
  removed-field error names the old file whose contents to use
- controllerStack.nktpValuesFile -> nvke-deploy.sh --values-for nktp=<file>
- registry block, --registry-api-key and REGISTRY_* overrides removed: no
  code read them; private image pulls use nerdctl login
- validate sitespec checks the environment; bootstrap site logs the CA paths
- CI harnesses and docs follow the same inputs; the bootstrap e2e asserts a
  supplied CA is the root SPIRE publishes

Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
2026-10-15 16:07:51 -07:00
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
Abhay Krishna 26d1d23670 fix(e2e): retry the local entrypoint's image pulls (#1581)
local-backend-e2e.sh pulled the bundle mirror's alpine and nginx
images, and the E2E runner image, without a retry. #1513 added one to
ci/backend-e2e.sh for the mirror's uncached-blob 404, and the same 404
then failed the Local entrypoint lane at its bundle mirror.

pull_with_retry, with the bounded timeout wrapper it uses, moves into
backend-e2e-lib.sh so both entrypoints share it. e2e_start_bundle_mirror
pulls a missing image through it before docker create and docker run,
which pull a missing image once, and uses a cached one as is, as docker
would, so a host that cannot reach the registry still starts the
mirror. local-backend-e2e.sh pulls the runner image through it the same
way. The function reports through the caller's log when there is one,
since Makefile.dev's bundle-mirror target sources the library from a
bare bash -c.

bounded runs timeout with --foreground, so Ctrl-C during a slow pull in
a hand run reaches the pull instead of being dropped, and falls back to
running unbounded where timeout lacks the flag, as it already did where
timeout is absent.

Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
2026-10-15 05:39:29 -06:00
Abhay Krishna 12a87a5bd9 docs: drop stale controller env var references (#1633)
The controller takes most of its settings from nke-controller-config,
and some docs and examples still name variables it does not read:

- in-place-rollout-design.md uses NODE_AGENT_UPDATE_METHOD, the name
  the design proposed. #1353 implemented the setting as
  nodeAgent.updateMethod in nke-controller-config, required only when
  a cluster sets a desired agent version.
- .env.tilt.example set TEMPORAL_UI_URL (gone since #1300),
  CONTROLLER_MANAGER_*_INTERVAL (since #404), CSR_APPROVAL_INTERVAL
  (since #173) and NODE_HEALTH_CHECK_*INTERVAL, which the controller
  never read. The Tiltfile stops forwarding the last two.
- The chart's env description says what the chart refuses: a variable
  nke-controller-config carries, and CONTROLLER_CONFIG_PATH. The
  README row had lost the first; neither named the second.
- Two comments and a Tilt error message no longer cite FORGE_URL,
  removed in #603.

Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
2026-10-15 05:20:31 -06:00
Eric Staples 5c095369f5 refactor(controller)!: remove control-plane controller flag and node-pool control plane path (#1608)
* refactor(controller)!: remove control-plane controller flag and node-pool control plane path

Control planes are always provisioned by the control-plane controller.
Remove PROVISION_CONTROL_PLANE_WITH_CONTROL_PLANE_CONTROLLER, the flag-off
node-pool provisioning branches, and the e2e plumbing that toggled it. Run the
control-plane migration unconditionally on worker boot.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* refactor(controller): remove unused NodePoolUpgradeConfig provider capability

The control-plane reconciler no longer resolves node-pool upgrades, so the
capability, its capi and nico implementations, and the factory that
GetProviderClient ran on every resolve have no callers.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* refactor(controller): count surge nodes from the in-memory control plane

reconcileNodesNeedingRollout re-listed the cluster's control-plane nodes to
count controller-managed ones, duplicating the list readControlPlane already
loaded for the same reconcile.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* fix(controller): guard nil controlPlaneConfig before reading desiredCount

Signed-off-by: Eric Staples <estaples@nvidia.com>

* docs(controller): tighten MigrateControlPlaneToController doc comment

Signed-off-by: Eric Staples <estaples@nvidia.com>

* fix(controller): skip clusters with no snapshot source in the migration leftover check

A non-deleting cluster with no configuration_id whose only control-plane
pools are deleting cannot be snapshotted, so its pooled nodes stayed pooled
and tripped the fail-closed check, blocking worker startup.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* test(controller): cover MigrateControlPlaneToController against Postgres

The re-parent, deprecated-generation and cleanup SQL is Postgres-only and had
no coverage. The test runs it on a fresh database named by
NVKE_TEST_POSTGRES_DSN and skips when that is unset.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* fix(controller): warn for each cluster the control-plane migration skips

A non-deleting cluster with pooled control-plane nodes, no configuration snapshot and no active control-plane pool has nothing to migrate from, so the leftover check skips it. Log a warning per skipped cluster with its ID, name and pooled node count so the skip is visible.

MigrateControlPlaneToController now takes a logger.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* test(controller): use the nvke name in control-plane test fixtures

name-check rejects the legacy product name in new lines.

Signed-off-by: Eric Staples <estaples@nvidia.com>

---------

Signed-off-by: Eric Staples <estaples@nvidia.com>
2026-10-14 18:38:29 -07:00
Lia 5038f6faaf feat(deploy): check-site.sh, and the site controller install as a list of commands (#1586)
* feat(cli): inspect sitespec prints the site values the shell reads

A hidden command: the site name, the management VIP, the trust domain
and the node architecture of a site spec, as shell assignments.
deploy/check-site.sh reads the architecture through it.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* feat(deploy): the stack install needs no registry pull secret

CAPNICo's GHCR package is public, and with a release its image comes by
digest from the release's registry or the local layouts. The site spec
loses controllerStack.pullSecret, the deploy path renders no
ghcr-imagepull Secret, CAPNICo's manifest names none, and the e2e suite
and the kind lane take no GHCR credential. A site spec that still
carries the block no longer loads.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* feat(deploy): check-site.sh reports what the site needs before the stack installs

One line per finding and the fix with it: the tools and the helm pin,
the checkout, the site spec, the release description and its declared
qualification, the run directory, the cluster API, an odd node count,
the node architecture against controllerStack.arch, the control-plane
taint the bootstrap removes, exactly one default StorageClass, the
Cluster API version, egress and disk. It changes nothing and exits
non-zero on a FAIL; when ready it prints the executor command.
--diagnostics writes nodes, pods, events, helm releases and the
controller logs under the state directory after a failed step.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: the kind lane runs the site runbook in order

check-site.sh, clusterctl init, the executor, then the SPIRE exec-auth
patch, the order the install guide gives. apply-capi-spiffe-exec-auth.sh
takes --kubeconfig so every kubectl call is pinned to the site cluster.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(deploy): check-site.sh treats a failed cluster read as a finding; the e2e suite expects the executor's subcommand

A denied, timed-out or flaky kubectl read used to come back empty and
pass, so a Cluster API that could not be read was reported as not
installed yet. Reads now fail the finding with kubectl's error, and
only NotFound means Cluster API is absent. The wrong-version finding
names the clusterctl upgrade command instead of a page that has none.
The ready line prints the init command only when one was emitted and
the executor by its resolved path. The suite covers denied reads, an
installed Cluster API and the NotFound case. The e2e dry-run test
expects nvke-deploy.sh install, which is what the stack driver builds.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(deploy): check-site.sh findings hold under more clusters; the executor refuses an unknown item type

The taint finding matches NoSchedule only, not PreferNoSchedule. The
Cluster API finding compares the image tag with a digest suffix stripped,
and a core at the pin without the kubeadm providers is a finding. A
missing nvkectl is a finding that skips the site spec and release
checks rather than an exit. Printed commands are shell-quoted. The
verdict and the diagnostics line carry the script's own name. inspect
prints no trace ID, so every line of the check is a finding. The
executor's item parser accepts only the item types the deploy path
format defines, so an unrendered path with an unknown type is refused
before anything is applied. The e2e driver writes placeholder registry
values for controller releases whose base-config template still reads
them. The exec-auth script refuses an empty --kubeconfig. The kind lane
workflow runs on changes to the files the lane now executes. The suite
covers an even node count, an architecture mismatch, two default
classes, an unreachable API, a core-only Cluster API, a missing
nvkectl, the unknown item type, and asserts the check makes no mutating
kubectl call. lib/common.sh holds only what the check uses.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* test(deploy): fix a quoting slip in the suite

An apostrophe escape meant for a single-quoted string sat inside a
double-quoted one and turned the rest of the file into a string.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* chore(deploy): the check and the lane name the operator guide that lists the install steps

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(deploy): the check reports what it cannot read; the e2e placeholder registry is one no image uses

A denied read of a kubeadm provider is a finding and no longer followed
by an 'already installed' pass. A Cluster API image pinned by digest
alone is reported as such rather than by its repository name. The
commands inside findings quote their paths. A site spec that nvkectl
cannot read is a finding, not an exit. The e2e driver's placeholder
pull-secret names a server no image uses, so older controller releases
that render it pull the public CAPNICo image anonymously.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

---------

Signed-off-by: Lia Campbell <liac@nvidia.com>
2026-10-14 11:48:12 -07:00
Terry Howe a9aa1b975d refactor(chart): rename nkeSystemNamespace and nkeOIDCAuth values keys, failing on the old ones (#1562)
* refactor(chart): rename nkeSystemNamespace and nkeOIDCAuth values keys, failing the render on the old ones

Helm ignores an unknown values key silently, so a site still setting the old keys would fall back to chart defaults, including tenant-cluster OIDC reverting to disabled. Rename both keys to nvkeSystemNamespace and nvkeOIDCAuth, keep the old keys in values.yaml empty, and add a render guard that fails naming the replacement.

Part of #1496. Closes #1550.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix(chart): key the renamed-values guard off presence, not truth

An explicitly supplied empty map is false in a Helm condition, so
--set-json 'nkeOIDCAuth={}' slipped past the guard and rendered on the
new key's defaults. Drop the empty defaults for both legacy keys so
presence only ever comes from the caller, switch the guard to hasKey,
and assert the empty-map case.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: rename the last nkeOIDCAuth readers the chart rename missed

The site deploy path still wrote nkeOIDCAuth into the controller values,
which the new guard refuses outright, and the CAPD and NICo VMs e2e
preflights still read nkeOIDCAuth.enabled from the installed release, so
they saw null and failed the run.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* docs(chart): document the renamed values keys and their replacements

Signed-off-by: Terry Howe <thowe@nvidia.com>

---------

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-14 10:27:21 -06:00
Lia eac79fa4c1 ci: bring the controller stack up on kind from a release, rendering inside the executor (#1583)
* ci: bring the controller stack up on kind from a release description

The lane builds the controller and the profiles fixture into OCI layouts,
copies the CAPNICo image, fills a nvkr.dev/release/v4 file from their
digests, renders deploy/nico against it with --nvkr-run-dir, installs the
result on a kind node and checks the pods run the release's digests.
Advisory; not a merge-gate member.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(cli): close the deferred findings of the site render

spire.trustDomain is required and never derived. The controller reads its
connection string from the chart's Secret, URL-escaped. A deploy path
missing a site-values item is refused. A malformed release.yaml is
reported once. Notes reach the log only when the render succeeds.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* chore(deploy): build the test nvkectl with the cli target and resolve Makefile paths from the file

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* docs(deploy): say which per-site values the render supplies and from where

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: give the kind lane the nktp values the other kind lanes use

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* feat(deploy): render for the site and the release inside nvke-deploy.sh

install --sitespec … --release … [--nvkr-run-dir …] renders the deploy
path through nvkectl into a private scratch directory, installs it and
removes it, so no rendered credential is left behind. nvkectl render
deploy-path is hidden: the script is its caller.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: the kind lane renders and installs through nvke-deploy.sh

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: free the runner's disk before the kind lane and record disk usage on failure

The stack's images filled the root volume; the postgres layer could not
be extracted.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>
(cherry picked from commit 2dda40b10fc3cac98edcb136c97f70a9ac748f72)

* ci: the kind lane checks the stack's own workloads, not every pod

An nktp gateway autoscaler may add a replica the runner cannot schedule;
kubectl wait --all then reports every later pod as timed out unchecked.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: the kind lane caps nktp's autoscaled collectors at one replica and asserts every stack pod

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: the kind lane takes the nktp kind values as they are once they carry a ceiling

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: the kind lane checks the clusterctl digest, names pod-list errors and asserts the spire namespaces

The pod sweep covers nke-system and spire-system, where the agent and
the CSI driver run, instead of a namespace no deploy path creates. A
failed pod list stops the lane with its namespace. The nktp guards match
a whole maxReplicas: 1 line. clusterctl is checked against the pinned
sha256, and the lane runs on every input it reads.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(cli): validate sitespec requires the trust domain the render requires

validate sitespec reports a missing spire.trustDomain, so its exit code
means the file is ready for the controller stack install. The render
checks the trust domain and the TPM checksum before it generates the
database password, so a refused spec leaves no file behind. The template
and the docs say the field is required for the stack install.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(deploy): --release needs --sitespec, which names the architecture

Without the site spec the render would pick artifacts for the host
architecture. The usage says --dry-run still renders and may create the
database password file. The docs describe the rendered tree as the
scratch tree the install removes.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* chore: drop an orphan comment from .gitignore

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: the kind lane's release carries the release-description/v1 schema

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* feat(cli): the bootstrap and the stack install share a default trust domain

Both default to nvkectl-bootstrap.nke.local, the domain of a bootstrap with
the default cluster name, so a site spec that sets spire.trustDomain to
nothing joins them to one domain. The render warns when it uses the
default; the bootstrap tells the operator to set the field when it ran
under another cluster name. validate sitespec no longer requires the
field, and says the bootstrap can run with the file while the
controllerStack section is still to fill in.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* feat(deploy): the render scratch lives under a private state directory and the kind lane proves it is removed

The render goes under NVKE_STATE_DIR (default $XDG_STATE_HOME/nvke),
created 0700, and is removed however the script ends. The suite checks
the directory mode and that a failed render leaves nothing. The kind lane
runs an install whose render fails and the real install under its own
state directory, and dies if either leaves a scratch tree or any rendered
file behind.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* docs(cli): spire.trustDomain is set once before the bootstrap, or never

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* ci: the kind lane works in a per-run directory it never empties, and runs on site-spec changes

The telemetry docs name the site spec's clusterName and nktpValuesFile as
the inputs of a site install, and --config and --values-for for an
install without one.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(cli): the bootstrap says when it defaults the trust domain; the kind lane owns its cluster and waits for Ready

The bootstrap logs the defaulted trust domain as soon as it takes it, and
warns when a custom bootstrap cluster name makes it differ from the
install's default; validate sitespec qualifies the shared default the
same way. The kind lane refuses a kind cluster of its name that was there
first and deletes only one it created, and a pod counts as ready only
when its Ready condition is True.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* docs(deploy): the usage says where the render lives once, and what --nvkr-run-dir is for

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix: the review round on the kind lane and the trust-domain docs

The bootstrap says it defaulted the trust domain before a dry run returns.
The docs qualify the shared default for a renamed bootstrap cluster, and
the troubleshooting entry names an install the script accepts. The
password file note is said at once. The executor renders with --ephemeral,
so the summary does not ask the operator to delete a directory the script
removes. The kind lane runs on the mirror branch only, on every input it
reads, and its cleanup probe has to fail in the render itself.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

---------

Signed-off-by: Lia Campbell <liac@nvidia.com>
2026-10-13 14:31:52 -07:00
Terry Howe 92d0f1541b refactor: rename CRD group to internal.nvke.nvidia.com and NKECluster to NVKECluster (#1585)
* refactor: rename CRD group to internal.nvke.nvidia.com and NKECluster to NVKECluster

Moves the management-engine's internal API group from internal.nke.nvidia.com
to internal.nvke.nvidia.com and renames the NKECluster kind to NVKECluster,
with its plural, controllers, finalizers and generated artifacts.

A group change is a new CRD: there is no conversion webhook and no automatic
migration, so existing sites copy their CRs across by hand. The procedure is
documented in docs/operations/crd-group-migration.md.

Regenerated with `make generate manifests` in management-engine and
`make chart-crds` from the root.

Two names the issue listed stay as they are, and the allowlist entry is
re-scoped rather than removed:

- NKENodePool and nkeClusterRef belong to the DGXC platform API
  (compute.private.x-dgxc.nvidia.com), which this repository emits CRs for in
  controller/scripts/cwe-to-platform-crs.sh but does not own.
- NKECluster also appears there, and in hack/test_name_check.py, where it is
  the fixture that proves the name-check detector still catches the shape.

Refs #1551

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix: add the migration page to docs/README.md and reformat after the rename

docs-check requires every page under docs/ to have a row in docs/README.md,
not only an entry in docs/index.yml.

The longer group name pushed a map literal out of gofmt alignment in
cli/internal/operator/dynamic_test.go, which golangci-lint reports as gci.

Refs #1551

Signed-off-by: Terry Howe <thowe@nvidia.com>

* docs: rewrite annotation keys and order CWE in the CRD group migration

The release CRs carry machine-init-kubernetes-version annotations under the old group prefix; copying them verbatim would hide them from the controller. Rewrite the keys, drop last-applied-configuration, verify in step 5, and document the CWE ordering and why status must be restored while the engine is stopped.

Signed-off-by: Terry Howe <thowe@nvidia.com>

---------

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-13 14:59:44 -06:00
Lia 44a136a877 feat(cli): the install reads the release description nvkr release export writes (#1598)
* feat(cli): the install reads the release description nvkr release export writes

The release input is the nvkr.dev/release-description/v1 document: every
output with its reference and digest, a native output's os and arch, a
multi-arch image's index children, and a chart's version. The reader takes
only that schema. The render refuses a chart the release carries at another
version than the item pins. inspect nvkr-release prints the reference, the
root digest and the declared qualification.

The export describes a release and verifies nothing; nvkr release verify
decides that for the same reference.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(cli): the chart-version check applies to repository charts; the reader refuses filtered and malformed descriptions

A path chart's pin is a placeholder the chart at the path overrides, so
the release's version is noted, not compared. A repository chart's pin
selects what installs: the release has to name that version, and a
missing one is refused too. The reader refuses a filtered description,
an image index without children or missing a required platform, an os
without an arch, an output carrying both arch and an index, and a
platform that is not os/arch; a platform outside the supported set is
reported by Select for the output asked for, not at parse. Select takes
a suffixed name's own suffix as its architecture and prefers the suffixed
output named for the architecture. The package doc and the help say the
export is unverified and verify runs first.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(cli): the release decides the version of every chart it carries

A chart the release carries is installed from the release's archive by
digest, so its version is the release's: the rendered release.yaml records
it. A pin that names another version is a warning that points at the
item's values, not a refusal; the pin decides only for a chart the
release lacks. The 0.0.0 placeholder of a chart in this tree is no
difference.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* feat(deploy): a path chart names no version

A repository chart is selected by its version, so release.yaml pins one.
A path chart carries its own in its Chart.yaml, and a release that
carries the chart decides, so the pin is gone from the controller and
nktp items in deploy/nico and the e2e deploy paths. Both readers accept
the absence; the rendered copy records the release's version.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

* fix(cli): a platform variant is its architecture; path charts in the e2e paths name no version

Select and the required-platform check compare on os/arch, so a child
published as linux/arm64/v8 serves linux/arm64. The item parser refuses
an empty version on a repository chart like the Go reader does. The e2e
postgresql items lose their version like the controller items did, and
the stack script's words about pins match. gofmt on the test file.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Lia Campbell <liac@nvidia.com>

---------

Signed-off-by: Lia Campbell <liac@nvidia.com>
2026-10-13 13:07:50 -07:00
Terry Howe 46b0a6272d fix(e2e): probe openvswitch before the builds, not after them (#1561)
* fix(e2e): probe openvswitch before the builds, not after them

The CAPD and NICo e2e entrypoints asked whether the host can load the
openvswitch module only after building the CAPD node image -- the last and most
expensive step before the suite starts. On the arc-arm64-cpu16 runners, which
cannot load it (#1515), both jobs therefore spent four to six minutes of a
cpu16 runner building an image they were about to throw away.

Nothing built in between can change the answer. The module lives in the host's
/lib/modules and the probe reads /sys/module, so the result is a property of
the runner's kernel; the image argument supplies only /bin/sh and modprobe.
Passing the CAPD node image made it look like a check on that image, which is
what put the call after the build.

So it moves ahead of the first build in both entrypoints and runs against
alpine:3.22 -- already pinned and pulled later in the same CI script, so no new
image enters the run. A host that cannot load the module now fails in seconds.

This does not fix #1515: those runners still cannot load the module and the
arm64 jobs still fail. It makes them fail fast and stop burning runner time.

Signed-off-by: Terry Howe <thowe@nvidia.com>

* fix(e2e): probe with the node image's own base, not alpine

Review feedback on #1561.

The probe has to run the same modprobe the nodes run. kindest/node carries
kmod 34.2 built +ZSTD, which is what reads Ubuntu's compressed modules; alpine's
modprobe is busybox's, a different implementation, so its answer would not be
the one that decides whether the suite can pass. (The review said alpine has no
modprobe at all -- it does, at /sbin/modprobe -> /bin/busybox. The conclusion
holds for the other reason.)

So the probe now uses the kindest/node image the CAPD node image is built FROM.
build-image.sh already owns that pin and the mirror prefix, so it gains a
--print-base-image mode and both entrypoints ask it rather than restating
either: a tag bump there reaches the probe with no second edit. The image is
one the node image build pulls minutes later anyway, so this still adds no
image to the run -- it moves one pull earlier.

Signed-off-by: Terry Howe <thowe@nvidia.com>

---------

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-13 08:57:13 -07:00
Anisha Gupta USandClaude Sonnet 5.5 2e6c4f35a5 feat(cli): give every nvkectl command one trace ID (#1354)
* feat(cli): give every nvkectl command one trace ID

nvkectl starts a root span for every command except help and completion.
The controller client sends the span's W3C traceparent and
"User-Agent: nvkectl/<version>" on every request, and nvkectl's log
records carry trace_id and span_id. Nothing is exported.

A failing command ends its error report with the trace ID, including one
whose request never reached the controller. A successful command prints
it as the last stdout line, except get, version, config and generate,
which write only their result and log the ID at debug level. bootstrap
site also reports the ID on stderr before it starts, so a run that fails
validation writes nothing to stdout.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* fix(cli): keep the trace ID off structured output and on every failure

The success-time "Trace ID:" line now goes to stderr. On stdout it
followed the JSON document of "create ... -o json" and added a key to the
YAML one, which breaks any caller that parses stdout.

A command cancelled by SIGINT or SIGTERM keeps its trace ID in the
cancellation report, because the request may already have been accepted.
A command that cobra rejects before any hook runs, such as an unknown
flag or an extra argument, now gets an ID too.

The trace run no longer sets process-wide state. The tracer provider and
the User-Agent belong to the Run, which the transport finds in the
request's context. Cobra's traverse-run-hooks setting keeps a subcommand
that declares its own PersistentPreRunE from replacing the root's hook.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* refactor(cli): start the trace in execute instead of a cobra hook

The root's PersistentPreRunE started the span, so a flag or argument error
that cobra reports before any hook ran needed a second, late start, and a
subcommand with its own PersistentPreRunE could have disabled tracing.

execute now starts the run before cobra parses anything and renames the
root span to the command path afterwards. The trace ID always exists, one
call site owns it, and cobra's traverse-run-hooks setting is no longer
needed. help and completion still report no ID.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* fix(cli): keep a malformed build version out of the User-Agent

A build can stamp any string into the version. A control character in it
made Go refuse every request to the controller over its User-Agent.
NewRun now reduces the version to RFC 9110 token characters, and falls
back to "dev" when none are left.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* chore(cli): trim comments and tests to what the change needs

Doc comments in the telemetry package and root.go now state the contract
only, with the one-line reasons next to the code they explain. Two
overlapping tests are removed and two merged into one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* chore(cli): name the test helper runNvkectl

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* docs(cli): explain how to use the trace ID to diagnose a bootstrap

The troubleshooting guide now shows the trace ID in the terminal output
and in the error example, and says how to pick one run out of a log by
its ID, in text and JSON logs. It also says the controller installed by
bootstrap does not record the ID in its own logs, so those are still
matched by cluster or node name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* feat(cli): warn when the controller reports a different trace ID

The controller returns the trace ID its logs and spans use in X-Trace-ID.
When that differs from the ID nvkectl sent, something between them, such
as an ingress or a proxy, dropped the traceparent header, and the ID
nvkectl prints matches nothing in the controller. nvkectl now writes one
warning to stderr per run that names both IDs. A response without the
header is not a mismatch and warns about nothing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

* fix(cli): no trace ID for --help, and clearer trace ID wording

A mutating command given -h or --help printed a trace ID, because cobra
answers the flag without running the command and returns success. The
help flag is now checked before the ID is reported.

The mismatch warning no longer says an intermediary dropped traceparent:
a different X-Trace-ID only shows that the controller reported another
ID, so the warning names both IDs and says what to check. The bootstrap
guide now says a command cobra rejects for a bad flag or argument prints
only the ID that ends its error, with no starting line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>

---------

Signed-off-by: Anisha Gupta <anisgupta@nvidia.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 10:57:19 -04:00
John Griffith 7c7c02949e chore: Rename nke to nvnke for images segment of codebase https://github.com/dsx-ai-factory/nvke/issues/1498 (#1548)
* chore: Rename nke to nvnke for images segment of codebase #1498

This is a "brute force" grep/replace approach to the image related
occurences of the nke name.  The goal is basically just a s/nke/nvnke/g
for everything in the repo that is associated with os-images.

This replacement bleeds into some other components (controller and agent)
that includes references to os-image names.

Closes #1498

* Keep existing image names valid

* Chore: Fix/Add DCO

Signed-off-by: jgriffith <jgriffith@nvidia.com>

---------

Signed-off-by: jgriffith <jgriffith@nvidia.com>
2026-10-12 17:08:48 -06:00
Abhay Krishna 8c6e47fc1e feat(controller)!: read settings only from nke-controller-config (#1527)
The controller now takes the 61 settings nke-controller-config carries
from the mounted file only. Each config.Config field that moved trades
its env tag for a controllerconfig tag naming its config.yaml key, and
controllerconfig.LoadStartupConfig fills them at startup from the file
CONTROLLER_CONFIG_PATH names, which is now required. The chart stops
setting the 61 variables, and config.Validate checks only what the
environment still supplies; the file validates the rest when it loads.

With no tracing.endpoint in the file, the controller falls back to the
OTEL_EXPORTER_OTLP_* variables the OpenTelemetry Operator injects, as
it did before. The exporter gets the endpoint as a URL whose scheme
carries the resolved transport, so an injected http:// endpoint cannot
downgrade a secure tracing.endpoint, and an https:// one stays secure.

Host-local runs and the gofail e2e worker start from
hack/local-controller-config.yaml. The e2e helpers that toggled OIDC
and permissive mode on the Deployment now edit nke-controller-config
and restart the controller.

Rolling back across this change needs the chart and the image rolled
back together: an older image under this chart runs on Go defaults for
every setting the chart no longer passes.

Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
2026-10-12 15:17:34 -07:00
Chao 6bc0e1c9e8 fix(agent): rename node agent package and contracts to nvke (#1565)
* fix(agent): rename node agent package and contracts to nvke

Signed-off-by: Chao Chen <chaoch@nvidia.com>
2026-10-12 14:14:32 -07:00
Ilya Kislenko 30a274ca9a fix(ci): match module packages to the full host kernel build (#1574)
Signed-off-by: Ilya Kislenko <ikislenko@nvidia.com>
2026-10-12 16:58:16 -04:00
Davanum Srinivas 991e236304 fix(e2e): retry mirror 404s in host builds and the node image pull (#1532)
mirror.gcr.io sometimes 404s a base image blob it has not cached yet; the profiles fixture build and the kindest/node pull failed on it.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-11 17:58:52 -04:00
Davanum Srinivas 74c1aab61a fix(e2e): stop early when the host cannot load openvswitch (#1531)
Without the module every OVN tenant stays unready and the run fails after about 105 minutes; check once after the node image is built.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-11 17:58:22 -04:00
Davanum Srinivas d156e068ef fix(ci): retry a mirrored helm chart fetch once (#1516)
mirror.gcr.io sometimes 404s a chart blob it has not cached yet, which failed the postgres install in Tilt.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-11 07:35:32 -04:00
Davanum Srinivas 90e85efc9b fix(ci): retry the bundle mirror image pulls in backend-e2e.sh (#1513)
The alpine and nginx pulls for the CAPD bundle mirror hit the same uncached-blob 404 as the runner pull; share its retry.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-11 00:24:42 -04:00
Davanum Srinivas 07da38b677 fix(e2e): give the CAPD suite 120 minutes (#1512)
Passing CAPD jobs take 103-111 minutes, so the shared 100-minute suite timeout cuts slow runs at the last spec.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-11 00:23:35 -04:00
Davanum Srinivas 855208113c fix(ci): retry the inner runner image pull in backend-e2e.sh (#1500)
mirror.gcr.io 404s blobs it has not cached, and the pull had no retry, so e2e legs died before the suite started.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-10 23:06:49 -04:00
Davanum Srinivas 3f71ad2cd4 fix(e2e): let the os-image lookup treat a missing GHCR package as no versions (#1493)
A package that does not exist yet answers with an object, and the jq filter assumed an array; the lane then failed with a jq type error instead of its own "no os-image built" message.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-10 21:11:44 -04:00
Davanum SrinivasandClaude Fable 5.1 7c2d8b3d79 test: rename the suite's own OS profile fixtures to nvke-* (#1475)
The three fixture profiles the suite owns, nke-nico-vms-24.04-amd64-fde,
nke-nico-vms-24.04-arm64-fde and nke-local-dev-kindest-arm64, become
nvke-*, together with the release manifests regenerated from them
(make -C controller fixture-releases, exact under --check), their
entries in the fleet-releases index including the -old-agent variant,
the metadata index, the lane and the two developer scripts that select
them by name, and the tests and documents that spell them.

The fleet release names mirrored from nke-site-deploy, such as
nke-260625-24.04-x86-fde, stay: they are rows users typed and names
existing sites carry (decision D15). The amd64 fixture remains a copy
of the fleet profile nke-nico-vms-24.04-amd64-fde, and its README now
says so by name.

Closes #1474

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 18:41:35 -04:00