13 Commits
Author SHA1 Message Date
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
Terry Howe 668df7db4a fix(hack): anchor mutagen ignores at controller/ and agent/ (#1409)
* fix(hack): anchor mutagen ignores at controller/ and agent/ under the monorepo root

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

* fix(hack): use the nvke name in mutagen example comment

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

---------

Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-10-13 13:03:39 -06:00
Davanum SrinivasandClaude Fable 5.1 3baba6d1b4 ci: give the name check its launch allowlist, and move the stragglers to the new name (#1484)
* chore: move test doubles, examples and stale references to the new name

What the name check still reported outside the Tier 2 identifiers:
synthetic names in tests (nke-site, nke-old, nke-injected, nke-role,
nke-key-1 and friends), registry and path examples in documents and
flag help (registry.example.com/nke, ghcr.io/my-org/nke, ~/dev/nke),
development defaults (DEV_NAME, kind contexts, the promtail job, the
mutagen example), stale references to packages renamed earlier
(internal/nke, nke.NewClient, nkecli, nkeutils), the `nke#1399` issue
shorthand, the CI image tag nke/capd-reboot-controller, the prune
script's package names, and a few comments and messages. The
UpdateNKERBAC rpc's errors now start with the rpc name, which no caller
parses.

Kept: the two synthetic fixture profiles' image URLs, because
osprofiles-to-crs refuses to change a published MachineImage spec; the
salt of the bring-up VMs' default password hash; the legacy installer
path the kubeadm-distro test asserts is absent; the fleet names existing
sites carry. The postgresql chart's description changes with a patch
bump.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

* ci: give the name check its launch allowlist

hack/name-check-allowlist.txt grows from two entries to 48, each with
its reason: the Tier 2 identifiers that stay until the post-launch
release (PR4 Kubernetes, PR5 node, PR6 OS image and packages), the
permanent keeps (migration names and texts, the NKEAuth magic and its
package, fleet release and profile names, the identity of existing
sites), the settings-coupled names (the old NGC token secret, the
CODEOWNERS team slugs, the S3 and apt names, the old CLI name), and the
files that keep the bare word (the agent version line the updater
parses, the OIDC upstream CA subject, the Keycloak lab, the two NVCR
workflows whose NGC organisation is named NKE).

With it, NAME_CHECK_MODE=fail make name-check passes on this tree:
5,908 hits, all allowed, every entry in use. The make target keeps
report mode until the launch flips it (W4).

Closes #1483

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

---------

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 19:24:52 -04:00
Aaron Patten 418ed5c55c chore(e2e): say controller, not CWE, in the e2e harness, CI and Tilt (#1394)
Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-09 09:44:03 -06:00
vwilson-nvidia 6b494863dc build: remove committed Go workspace vendoring (#1055)
- Resolve public dependencies through Go modules across builds and CI
- Remove vendor-only checks and the remote test bundle
- Refresh third-party notices and contributor documentation

Signed-off-by: Vivin Wilson <vwilson@nvidia.com>
2026-09-28 16:50:38 -04:00
Guillermo Gaston 472610d634 feat(nico-sim): unify nico-vms and mock-nico
Adds a Docker-backed NICo simulator backend alongside the existing VM backend, dispatched per site with a shared instances table. Existing databases migrate automatically at startup. Unifies the nico-mock and nico-vm Tilt providers into a single nico-sim provider.
2026-09-08 19:33:50 -04:00
Terry Howe ef98fff601 docs: remove links to deleted remote-colossus-tilt.md (#346)
Signed-off-by: Terry Howe <thowe@nvidia.com>
2026-08-27 07:30:59 -06:00
Akshay KumarandClaude Opus 5 485f0a5d4f refactor(controller)!: rename forge-vms to nico-vms (#279)
* refactor(controller)!: rename forge-vms to nico-vms

The name "forge" is NVIDIA-internal; NICo is the open-sourced name for the
same thing, so the component is renamed ahead of the OSS release (NKX-15090).

Renamed: the directory and Go module (controller/forge-vms ->
controller/nico-vms), both binaries (forge-vms/forge-vmsctl ->
nico-vms/nico-vmsctl), the FORGE_VMS_* environment namespace, host state under
/var/lib and /var/run, the /etc/sudoers.d setcap rule, the libvirt domain
prefix (forge-vm- -> nico-vm-), the diagnostic SSH account (forge-diag ->
nico-diag), the Tilt provider key, the Ginkgo label, the make targets and the
docs. The go.work entry, root Makefile WORK_MODULES, govulncheck GATE_WAIVED
and the lint/test workflow paths move in this same commit: `make work-check`
and the govulncheck gate both compare against those literals, so splitting
them would turn the required merge gate red.

Deliberately NOT renamed, because they name the upstream API this service
emulates rather than the service itself -- the same boundary nico-mock already
draws:

  - the /v2/org/{org}/forge/ and /carbide/ routes
  - apiName=forge in nico-credentials, which is also what CWE sends to
    production NGC
  - FORGE_URL and FORGE_ENVIRONMENT, read by CWE's real Forge client
  - Forge-Tenant-NKE, a real Forge tenant at az41
  - the carbide-pxe.forge metadata hostname baked into the FDE image

BREAKING CHANGE: no compatibility shims. Existing dev hosts must destroy their
forge-vm-* domains, re-run teardown-linux.sh then setup-linux.sh, re-export
NICO_VMS_*, and update the provider key in tilt_config.json. See the
"Migrating from forge-vms" section in controller/nico-vms/README.md.

The OS and config profile names (nke-nico-vms-*, nico-vms-cp, nico-vms-worker)
are owned by the nke-site-deploy fleet catalog; a matching MR there is required
before e2e resolves them against a real checkout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akshay Kumar <akshaykumar@nvidia.com>

* fix(nico-vms): require --nvram when undefining legacy forge-vm domains

The migration steps added in the previous commit told readers to run
`virsh undefine --remove-all-storage`, which aborts with
"Cannot undefine domain with NVRAM/varstore" on exactly the domains it is
meant to remove: every iPXE instance boots UEFI, so libvirt allocates an
NVRAM varstore, and undefine refuses to proceed unless --nvram is passed.

Match what the code already does in internal/vm/libvirt/virsh.go -- try
--nvram --tpm first and fall back to --nvram alone on older libvirt that
does not know --tpm.

Without this the stale domain survives, and because CreateAndStart marks
domains autostart while the new reaper only matches nico-vm-, it keeps
restarting and holding its DHCP reservation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akshay Kumar <akshaykumar@nvidia.com>

* fix(workspace): sort the nico-vms entry into its go.work position

`go work sync` writes the use() block lexically. ./controller/forge-vms sorted
before ./controller/hack/*, but ./controller/nico-vms sorts after it, and the
rename edited the line in place rather than moving it.

The set of modules is unchanged, so every static check passed locally --
`make work-check` skips the freshness re-derivation here because
cluster-api-provider-nico is not fetchable outside CI, which is exactly the
step that caught this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akshay Kumar <akshaykumar@nvidia.com>

---------

Signed-off-by: Akshay Kumar <akshaykumar@nvidia.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 20:16:18 -04:00
Ryan Bever 7dc33da82e fix(tilt): use monorepo sibling paths and absolutize external providers (#193)
Drop built-in forge-console wiring from the public controller Tiltfile.
Default CAPNICo and nke-site-deploy checkouts to sit beside the monorepo
root, and resolve relative external provider dirs to absolute paths so
build scripts that cd into provider_dir keep working.

Signed-off-by: Ryan Bever <rbever@nvidia.com>
2026-08-19 22:19:29 +00:00
Davanum Srinivas a3c868615c fix(license): normalise SPDX headers to Apache-2.0, and assert it (#197)
* chore(license): normalise SPDX headers to Apache-2.0 [machine generated]

MACHINE GENERATED. Every added line in this commit is
`SPDX-License-Identifier: Apache-2.0` and nothing else; every removed line is
the identifier it replaces, or the notice paragraph that followed it. Verified:
0 added lines are anything other than that SPDX line.

829 files. The repository ships Apache-2.0 -- LICENSE says so and GitHub
reports it -- while 676 Go files and 153 others declared a different
identifier, followed by a notice that contradicted it.

The copyright line, the comment style and the indentation are left alone. Files
carrying the short form, two SPDX lines with no notice paragraph, have the
identifier swapped and nothing else.

Markdown is excluded: there the identifier appears in prose describing the
mismatch rather than in a header, so rewriting it would turn the sentence into
a tautology. That file is handled in the next commit.

Three shapes needed care, and each is worth knowing about if this is ever
repeated. controller/api/prepend-license.go carries the block inside a Go raw
string, so the paragraph's last line ends with a backtick; the closing
delimiter is carried back onto the SPDX line rather than dropped, or the string
would be left unterminated. Two shell scripts under controller/hack/ word the
final sentence differently, so matching on the common ending alone misses them.
And controller/.golangci.yml prefixes each line with "# //", which has to be
stripped before the paragraph text can be recognised.

The templates that produce these headers are rewritten here too, so this commit
is self-consistent: the five addlicense boilerplates, the five goheader
templates in .golangci.yml, and the block in prepend-license.go. Every header
in the tree now names the same identifier.

Review the next commit. This one is a substitution.

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

* fix(license): one header template, and a check that reads it

The previous commit fixed the headers. This one stops them drifting again, and
is the part worth reviewing.

Nothing here could catch a header that named the wrong licence. addlicense only
ADDS a header to a file that has none; it never rewrites one already present.
So `make file-license-check` runs addlicense, finds every file already stamped,
produces no diff, and passes -- whatever the header says. agent/ is the proof:
its template and its check have both been correct all along, and six of its
files disagreed with them.

Three mechanisms defined the header and could disagree with each other: an
addlicense boilerplate per module, a goheader template in five .golangci.yml
files, and a hardcoded block in controller/api/prepend-license.go that stamps
generated API code. They are now one file, hack/license-header.tmpl, and every
module reads it.

make license-header-check replaces the per-module matrix and asserts two things
rather than one: that a header exists, and that it names Apache-2.0. The second
assertion is what this repository never had. Verified by planting a different
identifier in a file and confirming the check fails and names it.

Modules resolve the template through `git rev-parse --show-toplevel`, not a
relative path. A relative ../hack path silently changes meaning when a module
moves, which is how cli/ broke when it moved out of controller/.

The file set is the union of what the per-module targets already ignored, so
this covers exactly the files stamped today. 120 files carry no header at all
-- generated output, testdata, fixtures, build tooling, three .github files --
and widening the set to reach them is a separate change. Mixing headers that
are WRONG with headers that are MISSING would hide both.

Dockerfiles stay out: addlicense keys off the file extension and gives
Dockerfile.proto C-style // comments, which Docker cannot parse.

AGENTS.md's licence-header rule now describes the current state: one identifier,
added by `make license` rather than copied from a neighbouring file. The ban on
relicensing as a side effect of unrelated work stays.

The header-check job is renamed from "License headers (<module>)" to "License
headers". The merge gate calls this workflow whole rather than naming its jobs,
and the branch ruleset requires only `gate` and `DCO`, so no required check
changes name.

Verified: GOPROXY=off make build links all five binaries with no credentials;
golangci-lint goheader reports 0 issues on cli and controller; `make license`
is a no-op in all five modules; make license-header-check passes over 828 files
and fails on a planted mismatched header.

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

stderr is not captured when reading addlicense's output. addlicense prints the
offending paths to stdout, while `go run` writes "go: downloading ..." on a
cold module cache and "exit status 1" on failure -- both to stderr. Folding the
two together reports a module download as a file with no header, which is how
the first CI run of this check failed while passing on a machine whose cache
was already warm. Reproduced locally against an empty GOMODCACHE.

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

---------

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-08-18 20:42:45 -04:00
nhammernik fd95309ade chore: re-sync cwe from gitlab (#136) 2026-08-15 19:32:05 -04:00
jgriffith 18e42b26e6 Rename node-agent to agent.
Drop the redundant "node-" prefix so the module path is
github.com/NVIDIA/nke/agent rather than stuttering as nke/nke-agent.
Controller still consumes the published gitlab node-agent module until a
follow-up cutover.
2026-08-10 08:33:04 -06:00
nhammernik 7ce92b69ce feat: import cloud-workflow-engine (#7) 2026-08-05 16:25:10 -06:00