mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
pull-request/2437
78
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
47c3dc894c |
docs: stop scheduling compat-window removal for v0.25.0 (#2452)
* docs: stop scheduling compat-window removal for v0.25.0 Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
534e033790 |
feat(e2e): add a third DSX datahall for the GB300 lane (#2302)
* feat(e2e): run the GB300 datahall through the qualify-e2e lane Adds datahall-3, the GB300 stream that selects it, and a label to run it, through stage full. Every machine the datahall owns is an arm64 GB300 NVL72 tray with no DPU, which sets it apart from the other two DSX datahalls in three ways, and the harness now handles each: - Its VPC is FLAT. A host with no managed DPU can only be placed in a FLAT VPC, which has no prefix; NiCO attaches the instance itself when the create carries autoNetwork. dsx.yaml declares `autoNetwork: true` in place of `vpcPrefixID`. The site node is created that way and its address read from the NiCO machine, and the tenant's control plane and workers are NicoMachines with `autoNetwork: true` and no interfaces. A pool that names a prefix as well is refused. - It mints tokens from a Keycloak realm on its own API host, not from SSA. `issuerPath` names the realm's issuer base. A realm has no `carbide` scope and answers a request for one with 400 invalid_scope, so a datahall with an issuerPath asks for no scope, both when the suite mints and in the client CAPNICo is handed, and the nico-credentials template writes `scope` only when there is one. A token is reused until a minute before the issuer's expires_in, capped at the old five minutes. - Its API is served under a private CA, DSX_<DATAHALL>_CA_CERT. The suite's API and token clients trust it beside the roots they already have, and CAPNICo gets it as `ca.crt` in nico-credentials, base64 in `data` so the PEM renders on one line through either renderer. nvkectl's template context gains the field, left empty. dsx and dsx-arm64 leave the new stream out, and a new dsx-gb300 scope names it. The qualify-e2e-dsx-gb300 label runs that scope at the dsx environment's stage, without changing QUALIFY_E2E_SCOPE. A datahall that declares none of this behaves exactly as before. Signed-off-by: Jayson Du <jaydu@nvidia.com> * fix(ci): withhold the DSX API hosts from artifacts and the job log A DSX API host names its datahall, which is why the workflow takes it as a secret. But GitHub masks a secret only in the job log, and only in the form it was stored in, so the host still reached three places: - run-inputs.txt, an uploaded artifact, printed the datahall-1 and datahall-2 api rows in full. The resolved-inputs table now withholds DSX_*_API by shape, as it already does the jump hosts and the join token. - The withhold step scrubbed only the jump hosts and SSA_ISSUER from the log and reports it uploads. It now finds DSX_*_API too, and the suite's own redaction of the archives it writes takes the same values. - An error can name a host without its scheme, as a DNS lookup or a certificate mismatch does, and that is not the form the secret was stored in. Each withheld value is now also scrubbed as its host alone, and the run step masks those hosts in the job log, which a public repository publishes. Matched by shape, so a datahall added later is withheld without editing a list. Signed-off-by: Jayson Du <jaydu@nvidia.com> * build: update CAPNICo to v0.3.0-rc.1 v0.3.0-rc.1 is the first CAPNICo release with NicoMachine autoNetwork (dsx-ai-factory/cluster-api-provider-nico#279), which a FLAT VPC needs: without it CAPNICo cannot place a machine there, and a host without a managed DPU can join no other kind. capnico.yaml's header now says so, so the pin is not moved below it. NicoMachine and NicoMachineTemplate gain autoNetwork and phoneHomeEnabled and no longer require interfaces, and NicoIdentity gains a next-check time. Nothing else in the manifest changes apart from the image. Re-vendor capnico.yaml from the v0.3.0-rc.1 infrastructure-components.yaml asset, re-apply the two nvke manager args, and copy it into the embedded manifests with `make -C cli capnico-manifest`. The body is the asset byte for byte apart from those args. Move the pins that decide what runs: release.yaml, and the bootstrap manifest's ref and digest. The digest is the multi-architecture index's (amd64 and arm64), read from GHCR. The tests that pin them and the docs that name the deployed release move with them. The NicoIdentity debug page also takes rc.1's token-issuer messages: a 400 other than invalid_client, such as an unknown scope, is now AuthenticationFailed rather than ValidationFailed. controller/go.mod, management-engine/go.mod and the CRD fixtures stay at v0.1.0, so the lanes that build CAPNICo from go.mod, and gofail, keep testing v0.1.0 until the Go module follows in its own change. The clusterctl example in docs/site-bootstrap/infrastructure-providers.md also stays at v0.1.0: the rc.1 metadata.yaml lists only release series 0.0 and 0.1, so a validated clusterctl init refuses v0.3.0-rc.1. Signed-off-by: Jayson Du <jaydu@nvidia.com> * fix(ci): trim a withheld URL before taking its host host_of stripped a URL's port before its trailing whitespace, so an API stored as " https://api.example:443 " was masked and scrubbed as api.example:443, and an error naming api.example alone, such as a DNS lookup, kept the host. The provider trims the value, so that error is reachable. All whitespace now goes first: a value wrapped in newlines used to emit an empty ::add-mask:: and print the bare host on the next line of the job log. An IPv6 host also loses its brackets, as URL.Hostname drops them, so an error naming the bare address is masked and scrubbed too. Signed-off-by: Jayson Du <jaydu@nvidia.com> * test(e2e): cover the datahall CA's transport refusal and a missing issuer With a datahall CA set, New refuses a client whose transport is not an *http.Transport, because the CA cannot be added to an arbitrary RoundTripper. Options.HTTPClient now says so, and a test checks the refusal with a CA and the unchanged client without one. SSAClientFor and MintToken take the datahall's issuerPath or fall back to SSA_ISSUER. A test calls both with neither set and checks that each refuses before any exchange, naming the variable and the datahall. Signed-off-by: Jayson Du <jaydu@nvidia.com> * test(release): pin the streams each shipped DSX scope selects The scope matching tests use synthetic scopes, so nothing failed if a later DSX stream widened what a hardware label runs. The new test reads release/policy.yaml and checks exactly what dsx, dsx-amd64, dsx-arm64 and dsx-gb300 select. A DSX stream added later fails it until it is placed in those scopes on purpose. Signed-off-by: Jayson Du <jaydu@nvidia.com> * docs: say the DSX labels run stage full by default A labelled run takes its stage from QUALIFY_E2E_STAGE and falls back to full, so "at stage full" read as a pin the workflow does not have. Both qualify-e2e-dsx-gb300 rows, and the qualify-e2e-dsx row next to one of them, now say full by default. Signed-off-by: Jayson Du <jaydu@nvidia.com> * test(e2e): put the full-stage check back on one line The variable held the run environment for a CA check that has since gone, and only its Provider is read now. The line is back to what main has. Signed-off-by: Jayson Du <jaydu@nvidia.com> --------- Signed-off-by: Jayson Du <jaydu@nvidia.com> |
||
|
|
d03bd02584 |
refactor(controller): own the release CRDs in controller/k8s-apis (#2305)
The NVKE controller and nvkectl no longer import MachineImage, ClusterRelease and NodePoolRelease from management-engine. They are defined in a new module, controller/k8s-apis/v1, which generates their CRDs, tests them, and ships them through the nvke-crds chart, so the controller owns its release APIs end to end and no longer depends on management-engine's Go types. The API group is unchanged, so stored objects, RBAC and fixtures keep working. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> |
||
|
|
ef31c6efe7 |
feat(deploy): add a LaunchLayer deploy path that installs CAPLL (#2113)
* feat(deploy): add a LaunchLayer deploy path that installs CAPLL deploy/nico installs NVKE with CAPNICo. deploy/launchlayer is the same path with CAPNICo swapped for CAPLL, so a site built with NVKE's own tooling can run its tenant clusters on LaunchLayer: - capll: a template item from CAPLL v0.1.0-rc.15's release asset, whose manager flags (base URL, per-service overrides, identity Secret) are rendered from the stack config, plus a Secret get grant in nvke-system, where NVKE writes the bootstrap Secrets CAPLL reads. - nvke-base-config renders launchlayer-credentials in capll-system in place of nico-credentials. - The controller accepts launchLayer, turns the NICo grant and controllers off, and attests nodes with dsxImds. - The items the two paths share are copies of deploy/nico, held to it by a test: a file both hold must be identical unless it is one of the four LaunchLayer changes, so a pin bump in deploy/nico that misses deploy/launchlayer fails. The stack config gains an optional launchLayer object, with the client secret from NVKECTL_LAUNCHLAYER_CLIENT_SECRET. Each provider's values are required by the path that installs it, so deploy/nico and every existing stack config are checked and rendered exactly as before. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * refactor(deploy): install CAPLL from its chart on the LaunchLayer path The capll item becomes a helm item installing CAPLL's published chart, after spire, in place of a copy of its release YAML. The manager's flags reach the chart as site values, and its values add the SPIFFE exec-auth plugin and workload API socket the CAPI controllers get, which CAPLL needs to read a tenant kubeconfig once nvkeOIDCAuth is on. capll-system joins the nvke-service SPIFFE identity, and the Secret get grant in nvke-system moves to nvke-base-config, bound to the chart's ServiceAccount. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * chore(deploy): pin CAPLL's chart to 0.2.0 on the LaunchLayer path 0.2.0 labels the manager app.kubernetes.io/name=cluster-api-provider-launchlayer, as CAPLL's release YAML does, so nvkectl get providers finds a chart install. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * chore(deploy): install NKTP from NGC on the LaunchLayer path Copies deploy/nico's nktp item, which #2237 moved to NGC's public chart. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * docs(deploy): make the LaunchLayer path's image requirements readable Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * docs(deploy): trim comments on the LaunchLayer path Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * docs(deploy): keep only the LaunchLayer-specific comments in its controller overlay The rest repeated deploy/nico's overlay, which the header now points to. Values are unchanged; the rendered chart is byte-identical. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> --------- Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> |
||
|
|
afd2d48e32 |
revert: "feat(nvkectl): install the NVKE stack on the site cluster (#2000)" (#2159)
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com> |
||
|
|
84e8c56f1d |
feat(cli): gate the nico infra provider behind NVKECTL_ENABLE_NICO (#2157)
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com> |
||
|
|
0f48a09aa9 |
build: re-vendor CAPNICo v0.1.0 and local-path-provisioner v0.0.37 (#2100)
* build: bump the docker-images group across 5 directories with 4 updates Bumps the docker-images group with 1 update in the /agent directory: golang. Bumps the docker-images group with 1 update in the /agent/internal-scripts/docker directory: golang. Bumps the docker-images group with 2 updates in the /cli/internal/bootstrap/controllerdeploy/manifests directory: [dsx-ai-factory/cluster-api-provider-nico/controller](https://github.com/dsx-ai-factory/cluster-api-provider-nico) and rancher/local-path-provisioner. Bumps the docker-images group with 1 update in the /deploy/nico/capnico directory: [dsx-ai-factory/cluster-api-provider-nico/controller](https://github.com/dsx-ai-factory/cluster-api-provider-nico). Bumps the docker-images group with 2 updates in the /management-engine directory: golang and distroless/static. Updates `golang` from `9578611` to `2920bb1` Updates `golang` from `5c3e9b4` to `d9b6a1b` Updates `dsx-ai-factory/cluster-api-provider-nico/controller` from v0.0.45 to v0.1.0 - [Release notes](https://github.com/dsx-ai-factory/cluster-api-provider-nico/releases) - [Changelog](https://github.com/dsx-ai-factory/cluster-api-provider-nico/blob/main/CHANGELOG.md) - [Commits](https://github.com/dsx-ai-factory/cluster-api-provider-nico/compare/v0.0.45...v0.1.0) Updates `rancher/local-path-provisioner` from v0.0.31 to v0.0.37 Updates `dsx-ai-factory/cluster-api-provider-nico/controller` from v0.0.45 to v0.1.0 - [Release notes](https://github.com/dsx-ai-factory/cluster-api-provider-nico/releases) - [Changelog](https://github.com/dsx-ai-factory/cluster-api-provider-nico/blob/main/CHANGELOG.md) - [Commits](https://github.com/dsx-ai-factory/cluster-api-provider-nico/compare/v0.0.45...v0.1.0) Updates `golang` from `9578611` to `2920bb1` Updates `distroless/static` from `18f4cc2` to `25ac8f0` --- updated-dependencies: - dependency-name: golang dependency-version: 1.27.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-images - dependency-name: golang dependency-version: 1.27.3-bookworm dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-images - dependency-name: dsx-ai-factory/cluster-api-provider-nico/controller dependency-version: v0.1.0 dependency-type: direct:production dependency-group: docker-images - dependency-name: rancher/local-path-provisioner dependency-version: v0.0.37 dependency-type: direct:production dependency-group: docker-images - dependency-name: dsx-ai-factory/cluster-api-provider-nico/controller dependency-version: v0.1.0 dependency-type: direct:production dependency-group: docker-images - dependency-name: golang dependency-version: 1.27.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-images - dependency-name: distroless/static dependency-version: nonroot dependency-type: direct:production dependency-group: docker-images ... Signed-off-by: dependabot[bot] <support@github.com> * build: re-vendor CAPNICo v0.1.0 and local-path-provisioner v0.0.37 The image-only bump moved the tags but left every companion pin behind, which the repository's own guard tests caught. CAPNICo v0.0.45 -> v0.1.0 is a provider bump, not a digest refresh: the release ships a NicoIdentity CRD and controller, operatingSystemID on NicoMachine, primary DPU machine ID, failure-domain status backfill and Cluster API v1.13.6. Re-vendor capnico.yaml from the v0.1.0 infrastructure-components.yaml asset so the CRDs and RBAC match the image, re-apply the one NVKE-local edit (the manager's --reboot-annotation and --repair-annotation arguments, which upstream does not set), and regenerate the embedded copy and the stack template with `make -C cli capnico-manifest`. Move the pins that decide what actually runs: bootstrap-manifest.yaml holds the digest the default offline install uses, so a tag bump without it leaves v0.0.45 running. The digest is the multi-architecture index's, confirmed against the registry. local-path-provisioner v0.0.31 -> v0.0.37 the same way. The file declares itself verbatim from the upstream release, and v0.0.37 adds a health port, startup/liveness/readiness probes, a HEALTH_PORT variable and fully qualified image names that an image-only edit left out. Also move the references neither Dependabot nor the guard tests watch: LOCAL_PATH_PROVISIONER_VERSION, the e2e stack's manifest URL, and the docs that name either version. NicoIdentity is now served by the release the install deploys, so that note changes with it. controller/deploy/capd-e2e/capnico-crds/capnico-crds.yaml and controller/go.mod are deliberately untouched: those track the Go module ref, which is a separate bump. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback The FAQ pointed at a releases/download URL for the local-path-provisioner manifest, which 404s: the project publishes no release assets. Use the tagged raw path instead, the one the vendored manifest header and deploy/nvke-deploy-local.sh already use. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Check that cert-manager is ready before the bootstrap applies CAPNICo. v0.1.0 is the first CAPNICo release whose manifest creates cert-manager Certificate and Issuer resources, and installCAPICore skips clusterctl init, and with it cert-manager, on a kept cluster that already runs CAPI. Update the Helm install example to chart 0.1.0 to match the clusterctl path. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Terry Howe <thowe@nvidia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
3545d67a57 |
chore: name the release that removes the rename compat windows (#2034)
* chore: name the release that removes the rename compat windows The launch rename said "for one release" three times and named no release, so the four dual-accept windows had no removal date and were becoming permanent by default. All four windows landed on the v0.23.0 line, which is still in beta. None of their fleet gates can be met yet: the release they provide compatibility for has not shipped. So each window takes the comment path the issue allows, naming v0.25.0 and the gate it waits on, rather than being removed now: - node-agent JWT audience: gated on a fleet agent_version sweep - reserved "nke:" OIDC prefix: gated on pruneLegacyRBAC across all 41 sites - auth-config apiVersion: gated on an nke-auth-config ConfigMap sweep - legacy metric series: gated on Mimir retention aging the series out Only two allowlist entries die with their code, ^nke_controller_|^nke_auth_ and ^oidcPrefixNKE$; both now name v0.25.0. The audience and "nke:" entries cover further live names (the NVKR artifact, the pruned nke:cwe objects) and survive their windows, so their comments say which half is dated. Also folds in the two cosmetic items from the close-out audit: a note on NamespaceNVKESystem explaining why its value lags its name, and a separate section for nke-stack and the Keycloak dev scaffolding, which are not names an installed site persists and were never in the rename's scope. No behaviour change. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Correct the stated reason the "nke:" reserved prefix waits on pruneLegacyRBAC. ReservedIdentityPrefixes bounds OIDC usernamePrefix and groupsPrefix and compiles into the tenant apiserver's CEL user-validation rules; it does not reserve Role or ClusterRole names, so the claimed ClusterRole collision with the pruned nke:cwe objects was not a real mechanism. The two share a spelling, nothing more. The gate itself stands, on the narrower ground that no platform-owned RBAC should still carry the nke: name once a fleet-wide provider may mint nke: usernames and groups. Also names the generated-config fixture that moves with the removal. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback The node-agent audience window was gated on the wrong thing. The agent picks its audience with --controller-audience, which defaults to the legacy value and falls back to it when empty, and nodeAgentBootstrapFiles never passes the flag. Nothing else in the tree sets it. So every TLS/JWT agent requests the legacy audience whatever version it reports, and agent_version does not gate this window at all. Removing it in v0.25.0 on the old reading would have failed every TLS/JWT node closed. State the real precondition instead: something has to select the renamed audience, by the controller passing the flag or by the default flipping, before the fleet can roll onto it and the window can close. Also drop the hardcoded site count from the "nke:" gate; it goes stale and this repository is public. Signed-off-by: Terry Howe <thowe@nvidia.com> * docs: point the audience gate at its tracking issue The gate described a precondition with nothing tracking it. Name #2039, which covers having the controller select the renamed audience per node, and record why flipping the agent default is not the alternative. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
8f9a8faf74 |
feat(nvkectl): pivot the management plane from the seed to the site (#2006)
With infra.provider nico, once the NVKE stack is installed on the site, bootstrap site moves the management plane onto it: the SPIRE handover, a quiesce of the seed controller, clusterctl move once Cluster API has linked every Machine to its node, a copy of the controller database, and the Secrets clusterctl move does not carry. It then starts the site controller and checks that it reaches every node. A successful run deletes the bootstrap cluster; a failure keeps it for recovery. With --disable-mtls the site has no SPIRE, so the pivot skips the SPIRE handover and the check of each node's SVID. TestE2E_BootstrapSite checks, once the bootstrap returns, that the site holds the Cluster API objects and the bootstrap controller is stopped. The nico e2e lane runs its SPIRE checks against the site: each node's agent points at the VIP and attested to the site's SPIRE server. The lane's release-first teardown is dropped: once the site manages itself, the bootstrap cluster can no longer delete it. Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com> |
||
|
|
82c8b7e8a3 |
feat(cli): time each bootstrap phase with spans and log lines (#1979)
* feat(cli): time each bootstrap phase with spans and log lines bootstrap site runs in five phases: preflight, bootstrap_cluster, engine_deploy, site_cluster and finish. Each phase now has a child span of the run's root span and logs one "phase finished" line with its outcome and duration_ms, so phase durations are available without a trace backend. Every log line carries operation and, once the site spec is loaded, cluster. While a phase runs, a line also carries phase, and its span_id is the phase span's. The run tracks the current phase, because the component loggers are built before a phase starts and are given no context. With --json-logs the time is in UTC. The Kind cluster's log attribute is now bootstrap_kind_cluster, so cluster means the site cluster on every line. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(cli): keep the site cluster name on the lines that already carried it The handler adds cluster to every line, and a record that names cluster keeps its own value, so these lines carry it once. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * docs(cli): show the new log fields in the existing troubleshooting example Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(cli): let the bootstrap e2e allowlist accept the phase fields on its two log lines The allowlist matches each of those lines from time= to its end, so the operation, cluster and phase fields now on every line made gitleaks flag both again. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(cli): cover an interrupted bootstrap and a masked phase error Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(cli): give exported log records the phase span and fields With OTLP export on, the tee handler put the root span into a record's context before the log handler ran, so a context-free logger never got its phase span, and the exported record never got phase, operation or cluster. Resolve the span and fields once and use them for both the stderr line and the exported record. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(cli): log trace fields before the run fields again The previous commit stamped trace_id and span_id after operation, cluster and phase, which the e2e gitleaks allowlist does not match, so its etcd key line was reported as a leak. Restore the order and pin it in a test. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(cli): let a bound logger field win over the run's field A logger made with With("cluster", ...) got the run's cluster field as well, so the line had the key twice. Track the top-level keys a handler has bound and skip those run fields. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(cli): name the phase tracker's error parameter previousErr Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(cli): track a logger's bound fields per group Attributes bound after WithGroup go in the same group as the record's attributes, so the run's field collided with them and the line had the key twice. Start a new set of bound keys at each group, and make the test assert the group's one value. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * Revert "fix(cli): track a logger's bound fields per group" This reverts commit |
||
|
|
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> |
||
|
|
2cfd00081b | feat(nvkectl): install the NVKE stack on the site cluster (#2000) | ||
|
|
fba45dba31 |
fix(controller): clean up CAPI CRD startup handling (#1955)
* fix(controller): clean up CAPI CRD startup handling Fail startup when the required CAPI Machine CRD is absent and register Machine-dependent controllers unconditionally after the check. Keep LaunchLayer optional based on its CRD. Require the NicoMachine CRD when NICo controllers are enabled, and skip its discovery when they are disabled. Signed-off-by: Ryan Bever <rbever@nvidia.com> * fix(cli): disable NICo controllers for provisioned bootstrap Configure the controller chart's NICo controller setting from the selected bootstrap infrastructure provider. Provisioned sites now disable NICo controllers and avoid requiring the NicoMachine CRD, while NICo sites explicitly enable them. Extend the existing deployment test to verify both provider settings. Signed-off-by: Ryan Bever <rbever@nvidia.com> * Review comments Signed-off-by: Ryan Bever <rbever@nvidia.com> --------- Signed-off-by: Ryan Bever <rbever@nvidia.com> |
||
|
|
470dcdb380 |
feat(cli): export nvkectl spans and add --otlp-endpoint to bootstrap site (#1880)
Spans (the run's root span and its HTTP client spans) are exported to the same OTLP endpoint as the log records. bootstrap site takes --otlp-endpoint and --otlp-insecure, and points the temporary controller in the bootstrap cluster at the same endpoint so its spans join the run's trace. OTEL_EXPORTER_OTLP_HEADERS are now also given to the temporary controller, in a 0600 values file and not a command-line argument, and are masked in nvkectl's output, exported telemetry and diagnostics. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> |
||
|
|
d242af22c3 |
fix(cli): load images pinned by digest into the bootstrap kind cluster (#1924)
Signed-off-by: Akshay Kumar <akshaykumar@nvidia.com> |
||
|
|
34f021e3ba |
fix(cli): allow empty OIDC username prefixes (#1925)
* fix(cli): allow empty OIDC username prefixes Signed-off-by: Frank Spitulski <fspitulski@nvidia.com> * fix(cli): require explicit OIDC username prefixes Signed-off-by: Frank Spitulski <fspitulski@nvidia.com> * test(cli): separate OIDC prefix regression test Signed-off-by: Frank Spitulski <fspitulski@nvidia.com> * docs(cli): explain explicit OIDC username prefix Signed-off-by: Frank Spitulski <fspitulski@nvidia.com> --------- Signed-off-by: Frank Spitulski <fspitulski@nvidia.com> |
||
|
|
46d94f5b45 | feat(cli): add OIDC discovery URL overrides (#1920) | ||
|
|
229df84386 |
feat(controller): allow dev control planes without a VIP (#1893)
* feat(controller): allow dev control planes without a VIP Closes #1892 Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> * docs: clarify no-VIP development guidance Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> * docs: document accepted no-VIP rollout behavior Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> * test(e2e): fit CAPD control planes to local memory Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> --------- Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> |
||
|
|
82015ca14b |
feat(nvkectl): hand node SPIRE identity from the seed to the site (#1846)
Add the spirehandover package, the SPIRE step of the seed-to-site pivot. It checks that the seed and site SPIRE servers share a trust domain and UpstreamAuthority, copies the ClusterStaticEntries and the TPM allowlist to the site, moves the seed server's datastore and signing keys onto the site server's volume, evicts the seed's own agents, verifies the site serves the seed's authorities, and repoints the nodes through the seed controller. Each step reads the clusters first, so a re-run is safe. Add the controller client methods for the cluster spire-server API. Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com> |
||
|
|
116232b2a1 |
fix: prevent bootstrap cluster pods getting IPs from kind CIDR (#1835)
* fix: prevent bootstrap cluster pods getting IPs from kind CIDR Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: resolve coderabbit comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: nerdctl bridge check Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: prevent nerdctl networking from getting into the site node networking Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: local agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: prevent env var being set to cause networking being forced into nerdctl that gets shared to cluster Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> --------- Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> |
||
|
|
48dc309320 |
fix(chart): run the controller as an unprivileged user (#1874)
The chart defaulted podSecurityContext.runAsNonRoot to true, but the controller image had no USER and the chart set no runAsUser, so the kubelet would refuse to start the pod. Every deploy path worked around it by setting podSecurityContext to null and turning the read-only root filesystem off, which ran the controller as root everywhere. That contradicted controller/SECURITY.md, which assumes the chart's non-root and read-only-root settings are enforced. The image now declares USER 65532:65532. The chart sets the same uid explicitly, with runAsGroup, fsGroup and the RuntimeDefault seccomp profile, and the container drops every capability and disallows privilege escalation. Setting the uid in the chart rather than relying on the image covers the materialize-profiles init container too, whose operator-built content image usually has no USER. That init container now copies with cp -R, since an unprivileged cp -a fails to preserve the image's root ownership on every file, and it takes the controller container's securityContext, so it too drops every capability and runs on a read-only root. The overrides come out of the nvkectl bootstrap values and the deploy/nico, capd-e2e and capnico-e2e overlays. Tilt keeps running as root on a writable root filesystem: live_update syncs the binary into /usr/local/bin in the running container, which uid 65532 on a read-only root would refuse. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
a12fc8aaec |
feat: site bootstrap capnico e2e (#1822)
* feat: add nico bootstrap testing Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: port the nico e2e lane to the current bootstrap design Finish the rebase of the nico e2e work onto site-bootstrap-capnico, which left it half-applied. - Keep the controller profiles image (NVKECTL_CONTROLLER_PROFILES_IMAGE), the OS-independent config profile source, with its tests and docs. - Drop the tenant credentials Secret hook: bootstrapTenant supplies the login and bootstrap site creates the Secret. - run-nico.sh: OVN instead of Calico, bootstrapNico/bootstrapTenant/ bootstrapReleases in the site spec, the fixture release pair for the OS profile, nvke names, and checks that the ClusterRelease and the tenant Secret reached the bootstrap cluster. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: rebase fixes to schema and other bits Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: 3 node nico bootstrap succeeds Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: nico always requires a VIP Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: rebase fixes Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: spire updates for nico 3 node bootstrap Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: nico e2e hardening Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: nico e2e hardening Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: local agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: update OVN version Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: add nico e2e run Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: docs update Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: linter errors Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: rebase after var rename Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: code review fixes Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: source shared lib Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: use NVKECTL_NVKE_CONTROLLER_ instead of NVKECTL_CONTROLLER_ Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: coderabbit review update Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: code rabbit review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: docs update Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> --------- Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
deb3f8826a |
feat(nvkectl): name the controller image flag and settings nvke-controller (#1776)
* feat(nvkectl): name the controller image flag and settings nvke-controller
nvkectl bootstrap site reads the NVKE controller image from
--nvke-controller-image and its deploy settings from
NVKECTL_NVKE_CONTROLLER_{IMAGE,PORT,HELM_TIMEOUT,READY_TIMEOUT,TEMPORAL_CHART,
SPIRE_CHART,SPIRE_CRDS_CHART}. The earlier names (NVKECTL_CONTROLLER_* and
NKECTL_CONTROLLER_* from the cli/v0.2.0 release candidates, NKECTL_CWE_* from
cli/v0.1.x) are never read: one set without its replacement stops the command
and names the replacement; one set beside it logs a warning.
--controller-image is no longer a flag.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs(site-bootstrap): require cli/v0.2.0 for the custom base OS bootstrap example
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* fix(nvkectl): drop the check for earlier controller setting names
bootstrap site reads only NVKECTL_NVKE_CONTROLLER_* and --nvke-controller-image. The earlier NKECTL_CWE_*, NKECTL_CONTROLLER_* and NVKECTL_CONTROLLER_* names were only ever used inside NVIDIA, so they are ignored rather than stopping the command or drawing a warning.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs(cli): regenerate the bootstrap site reference for --nvke-controller-image
Signed-off-by: Aaron Patten <apatten@nvidia.com>
---------
Signed-off-by: Aaron Patten <apatten@nvidia.com>
|
||
|
|
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> |
||
|
|
f0a043d73e |
docs: call NVKE's cluster the management cluster, not the site controller (#1744)
Replace "site controller" with "management cluster" (the cluster) or "management plane" (the NVKE API and controllers) in docs, CLI docs and help text, examples, and deploy-path comments. Identifiers such as nke.site-controller.internal, the site-controller e2e lane and the dashboard UID are unchanged. Supersedes #1737, which was closed so the launch batch had no ordering dependency on #1733. Signed-off-by: echapman13 <echapman@nvidia.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
46f04ce59e |
feat: write labels and annotations under nvke.nvidia.com and read both domains (#1713)
* feat(controller): add the keys package for the nvke.nvidia.com label domain The labels, annotations, taints and node conditions this controller owns move from nke.nvidia.com to nvke.nvidia.com. The rename is not atomic: objects labelled by an earlier build keep the old keys until something rewrites them, and a reboot or terminate request applied by hand arrives under whichever domain the operator knows. keys.Key holds the bare name and renders it under either domain. Callers write Key.String(), always the new one, and read with Get/Value/Has/ Matches, which accept both. Key.All() is the delete form, because removing only the new key leaves a legacy copy the next read would find. Both domains are compiled in, as cluster-api-provider-nico did for its own rename: there is no third domain anything could read, so there is nothing to configure. Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(controller): write object keys under nvke.nvidia.com and read both domains Routes every label, annotation, taint and node-condition key the controller owns through internal/keys, and deletes the string constants that held them. Writes land on nvke.nvidia.com; reads accept either domain, preferring the new one. Three places need more than a mechanical swap: - Node topology labels are rewritten on reconcile, which drops the legacy key rather than leaving a node carrying both. - Taint removal strips both domains. A node joined before the rename carries the provisioning taint under the legacy key, and a workflow untainting it may now be asking for the new one; removing only the requested form would leave the node NoSchedule for good. - Reboot and terminate completion clears both forms of the request label, which an operator or an external automation may have applied under either. Secret ownership labels converge the same way: a rewrite drops the legacy key so a Secret carries one domain, not two that could drift. Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(nico): point the capnico reboot and repair annotations at nvke.nvidia.com cluster-api-provider-nico watches exactly one Machine annotation for a reboot and one for a repair, named by --reboot-annotation and --repair-annotation, and silently ignores a request under any other key. A mismatch is not an error anywhere: reboot and repair requests are simply never actioned. So the controller writes both annotations under both domains until every deployment has moved, and these manifests move to the new one. Both keys are owned by the same field manager, so clearing the annotation still clears both. The dev capd-reboot-controller reads either form. Sites that deploy capnico from their own manifests can move the flags on their own schedule; see docs/operations/label-domain-migration.md. Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(cli): write the etcd key cluster-name annotation under nvke.nvidia.com nvkectl writes this annotation onto the etcd encryption key Secret it saves to disk, and reads it back to match a file to a cluster. The legacy key stays exported so a file written by an earlier nvkectl is still readable. Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(capp): write the SPIRE agent path annotation under nvke.nvidia.com The provider owns this Machine annotation, so it is the thing that moves a Machine over: the write drops the legacy key rather than leaving two for the controller to choose between. Signed-off-by: Terry Howe <thowe@nvidia.com> * docs: describe the nvke.nvidia.com label and annotation domain What an existing site has to do (check the capnico flags, and anything outside NVKE that matches on these keys), what it does not (relabel objects, coordinate the upgrade, change how reboots are requested), and which nke.nvidia.com names are deliberately not part of this change. Signed-off-by: Terry Howe <thowe@nvidia.com> * chore: link the capnico dual-write to the issue that removes it The two Machine annotations written in both domains are scaffolding for a rollout, not a design. FIXME them against #1718 so the next reader knows what has to be true before they go, and say in the migration guide that a stale --reboot-annotation or --repair-annotation becomes a silent failure once the dual write is gone. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback - nodestatus: try the current domain before the legacy one when reading NeedsRecycle and NeedsRepair. Status.Conditions has no ordering guarantee, so matching either form took whichever came first: a stale legacy False left by an earlier build could mask a current True and drop the recycle or repair request it records. - nico_spiffe_controller_test: assert absence against the rendered key. testify compares map keys without converting types, so a keys.Key needle made the NotContains pass even with the annotation present. - capd-reboot-controller: honour a legacy reboot-complete timestamp. It already read a legacy reboot request but checked only the current completion key, so it replayed the simulated reboot and overwrote the completion it had already recorded. - management-engine: reserve nvke.nvidia.com in the userParams.labels CEL rule, not just in the doc comment. The rule excluded the legacy domain only, so a label under the domain this controller now writes could pass CRD admission and collide with one NVKE owns. The REST API validator already rejected both domains; this aligns the two. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
9c8ff900e9 |
feat(cli): the render keeps credentials out of the values files (#1610)
* feat(cli): the render keeps credentials out of the values files No values file the render writes carries a credential. Every chart on deploy/nico reads its secret from a Kubernetes Secret by name, and the render writes those Secrets as one manifest item, site-credentials, added right after the first item: nvke-database in the postgresql, temporal and controller items' namespaces, with the password from NVKECTL_DATABASE_PASSWORD and the controller's connection string, and spire-upstream-ca in the spire item's namespace when the site uses a CA. The namespaces come from each item's release.yaml. The Secrets are written as data, not stringData, so the server-side apply the executor uses can update them on a later install. The connection string escapes the user and password as URL userinfo. SPIRE no longer takes the CA through --set-file; the chart creates no Secret of its own. nvkectl render deploy-path --credentials external renders for a tree that lives in a repository: no credential variable is read, no CA file is read, no Secret and no .gitignore are written, and the command lists the Secrets the cluster has to hold, namespace, name, keys and type. A template file is split into its documents and each is classified by its own kind, so a ConfigMap beside a Secret still reaches the tree. 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> * fix(cli): an external render loads the site spec without the CA sitespec.LoadDescription reads the site spec without the SPIRE CA: the variables are not read and no file is opened, and spire.upstreamCA still says the site uses one. The external render uses it, so a host that renders a tree with no secret needs no CA key. Template streams are split with the YAML decoder, so a separator with a comment or a tag still starts a new document. A deploy path that already lists a site-credentials item is refused. The suite's base64 assertions no longer depend on line wrapping. 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> * fix(cli): merge the site-credentials Secrets by name and keep an external tree portable Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix(deploy): refuse a --values-for appDb override the controller would ignore Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: use yaml parser not shell for parsing yaml Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Patrick Christopher <pchristopher@nvidia.com> |
||
|
|
dc6de14c28 |
feat(cli): default the generated site spec to Kubernetes 1.36.3 (#1702)
`nvkectl generate sitespec` wrote k8sVersion "1.34.2", the oldest of the three Kubernetes versions the node image stages (os-image/packages/kubeadm-distro/Makefile sets K8S_VERSIONS ?= v1.36.3 v1.35.3 v1.34.2). A management cluster is set once at bootstrap and does not upgrade itself, so the default decides what a new site runs for its whole life. 1.36.3 is the newest staged version and the minor every stream in release/policy.yaml targets. Move the default, the two bundled site-spec examples and the docs that state it. The NICo release examples move with it: a ClusterRelease or NodePoolRelease annotated machine-init-kubernetes-version "1.34.2" with -injected "false" is only a candidate for a 1.34.2 cluster (controller/internal/machinerelease/upgrade.go rejects a mismatch), so leaving them behind would have made the bundled NICo example set inconsistent with the site spec beside it. cli/examples/capd-cluster.yaml stays on 1.34.2 deliberately. CAPD runs on kindest/node, pinned to v1.34.8 by controller/hack/capd-kindest-node/build-image.sh, so that example has to track the 1.34 line rather than the node image. Verified: gmake -C cli test, gmake -C cli lint, gmake docs-check. Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
0c48b2612e |
feat: bootstrap site can use capnico for initial node creation (#1356)
* fix: rebase Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: rebase repair Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: make bootstrap nico follow patterns of tenant nico registry Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: dry-run catches mTLS mismatches Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: code review updates Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: linter fixes Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: code review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: refactor, comment update Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: review changes, use approved schema Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: nico bootstrap troubleshooting Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: capnico manifest Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: local agent reviews Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: local agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: move credentials from sitespec to env vars Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent fixes Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent reviews Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> --------- Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
899edb3368 |
fix(cli): keep the generated Postgres password out of bootstrap output (#1596)
The generated Postgres password went to helm as --set-string arguments, so a failed install printed it in the error, and it showed in the host's process list. The controller chart also put it into the controller pod's spec, so the diagnostics bundle held it. The password now goes to each install in a values file created 0600, not on the command line. The controller is installed with secrets.createDbSecret=true, so its pod reads the database URL from a Secret and the pod spec never holds it. The command an error prints is still masked for any registered credential. As a backstop the diagnostics bundle is scrubbed before it is published, by a shared redact package: registered credentials, and the password in any database URL. The dump goes into a private temporary directory outside --diagnostics-dir, which is the only thing the scrub reads or rewrites, and only regular files that were scrubbed are copied into place. A file already in --diagnostics-dir is left exactly as it was, and the bundle is never written through a symlink or a non-directory already under it. Nothing unscrubbed is ever written there, and the temporary directory is always removed; if it cannot be, its path is logged. A file the scrub cannot clean is withheld, not published. A directory it cannot read and a root that is not a directory are reported, and a symlinked root is followed. Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
9b96cb09fc |
refactor(cli): move the nvkectl command tree into an importable package (#1407)
The command tree lives in package main, where it can be executed but never
imported. A second program therefore has no way to reach it, which is what a
generated CLI reference needs: the reference has to be built from the same
tree the binary runs, or the two drift.
Move the tree to internal/nvkectl and leave cmd/nvkectl as a shim. The split
follows what kubectl, clusterctl, gh and argocd each do for the same reason.
The build-time version strings stay in package main. The linker matches -X on
the package NAME, and for a command that name is "main", so a symbol moved
into internal/nvkectl would be silently left at its default -- no error, no
warning, just a binary reporting "dev". `make -C cli build` runs the binary and
fails on that, and it still passes.
Terminating the process stays in cmd/nvkectl. The internal package exposes
Run, which returns the status to exit with rather than calling os.Exit itself:
an os.Exit inside an importable package takes down whatever imported it,
skipping every deferred close, flush and cleanup still outstanding. Run also
hands the signals back and releases its watcher goroutine before returning, so
it leaves a caller's signal handling as it found it. Two tests cover this, and
both fail loudly if it regresses -- an os.Exit would take the test binary with
it.
contract_test.go stays in cmd/nvkectl too. It builds the binary from its own
directory and runs it as a process, referencing no symbol from the package, so
it keeps testing the same boundary from the same place.
The CI path filters move with the files. Three workflows selected the old
location:
- capd-e2e.yml and the cwe_facing regex in e2e-pr-path-filter.yml both
matched cli/cmd/**. controller/hack/ci/nvkectl-smoke.sh drives config
set-site, config view, create cluster and delete nodepool against a live
controller, and all four now sit in internal/nvkectl, so without this a
later change to any of them would skip that lane.
- kind-stack-from-release.yml named cli/cmd/nvkectl/validate.go and
cli/cmd/nvkectl/render.go by exact path; both are repointed.
cmd/ stays in the first two lists: it still holds main and the contract test.
No behaviour change: the help output of all 46 commands is byte-identical to a
binary built from main.
Signed-off-by: Jonathan Meier <jomeier@nvidia.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
f4263e1fe2 |
fix(nvkectl): stop bootstrap site when an unread NKECTL_CWE_* setting is set (#1651)
nvkectl does not read the NKECTL_CWE_* names that nkectl cli/v0.1.x used for the controller deploy settings. bootstrap site now stops before doing any work when one is set without its replacement, naming the replacement, and warns when the replacement is set. The e2e harness passes only the NVKECTL_* image variables. Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
8a31cda52b |
ci: allowlist the oidcPrefixNKE site-spec constant (#1624)
The name check rejects the identifier even though the "nke:" prefix it names is already allowed. Signed-off-by: Vignesh Goutham Ganesh <viganesh@nvidia.com> |
||
|
|
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> |
||
|
|
80e34a26bc |
feat(cli): deploy OIDC providers during site bootstrap (#1601)
* feat(cli): pin fleet OIDC providers during site bootstrap Put optional cluster.oidcProviders on the site spec and merge them into the controller Helm values before the single install, so the site API server receives those issuers. Leave the list unset for today's behavior, and reject a list when Kubernetes is older than 1.34. Signed-off-by: Vignesh Goutham Ganesh <viganesh@nvidia.com> * refactor(cli): pass site OIDC providers in a second Helm values file Leave the embedded controller values untouched. When the site spec sets providers, append a values file that only contains oidc.providers so the PEM stays out of --set. Reject an issuer that is not https, and a caBundle that is not a PEM certificate, before bootstrap continues. Signed-off-by: Vignesh Goutham Ganesh <viganesh@nvidia.com> --------- Signed-off-by: Vignesh Goutham Ganesh <viganesh@nvidia.com> |
||
|
|
3038cf917c | feat(controller): gate new Calico clusters (#1599) | ||
|
|
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> |
||
|
|
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> |
||
|
|
f3987a7dae |
feat(cli): mint a breakglass kubeconfig at site bootstrap (#1434)
Stop writing kubeadm admin.conf to disk. Bind nvke:breakglass to cluster-admin and issue a CSR-backed client cert for the operator file. Delete the CSR even if the wait for the signed cert fails. Signed-off-by: Vignesh Goutham Ganesh <viganesh@nvidia.com> |
||
|
|
97ca3ab273 |
feat: install the controller stack from an NVKR release (#1428)
* feat: install the controller stack from an NVKR release nvkectl render deploy-path takes the release description nvkr release verify prints (nvkr.dev/release/v4) beside the site spec: charts the release carries are pulled by digest into charts/<item>/ and verified, image artifacts become a release-images.yaml values file or a kustomization, images.txt lists the images the result runs, and with --nvkr-run-dir everything comes out of a local Run's OCI layouts. Each item's release.yaml binds the NVKR artifacts it uses by name. The executor applies the result: an archive chart.path skips the dependency build, a kustomization.yaml is applied through kubectl kustomize, and images.txt layouts are imported into the node's containerd first. --chart-override is gone; the release is the single chart source. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * refactor(cli): pull release charts with oras-go instead of the oras binary The render resolves and fetches chart manifests and archives through oras-go v2: a registry and an OCI layout are the same read-only target, digests are verified by the store, and the --oras flag goes away. The operator no longer needs oras to render. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * chore(cli): regenerate third-party notices for the OCI dependencies Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): name release images repository@digest in images.txt A release may reference an image as repository:tag@digest. The inventory drops the tag, so the imported name matches the one the values and the kustomization ask containerd for. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): import images with containerd's local path and check the digest alias ctr images import --local names every manifest of the layout <repository>@<digest>; the transfer import keeps an annotated name and skips that alias. The executor checks the alias exists after the import. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): cancel registry requests with the command context Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): read images.txt before importing, so docker exec cannot eat the list CTR may be `docker exec -i`; inside a while-read loop its stdin is the list, and the post-import check consumed every line after the first. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * test(cli): rename the node image fixture artifact to nvke-node-image Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
ac96cd13f0 |
feat(cli): render a deploy path for the site the site spec describes (#1567)
* feat(cli): render a deploy path for the site the site spec describes nvkectl render deploy-path copies a deploy path and resolves it for the site: the controller, SPIRE, PostgreSQL and Temporal items get a site-values.yaml built from the site spec's controllerStack section (the database password, the OIDC discovery URL, the SPIRE server address and identity, the controller's admin ID, the TPM attestor checksum, the bootstrap CA, a registry mirror), template items are rendered with Go text/template and become manifest items, and site.env names the site. Secrets are read from the files the spec names and written into the result, so it is created 0700 and is for one install. The executor installs the result with no --config. deploy-test joins the merge gate with the executor's dry-run suite; the executor stops on a parser failure instead of installing nothing. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * docs(cli): name the item list file by its current name Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): review fixes for the site render A rendered tree installs from anywhere: a committed chart.path is written absolute, and the executor takes an absolute chart.path as is. Secrets holding a quote, a backslash or a control character are refused by field, since the templates carry no escaping. spire.ca*File resolve from the working directory, as bootstrap site reads them. The OIDC domains are read from the overlay as YAML, so a comment inside the list no longer truncates it. --out is created first with Mkdir, so an existing directory is left alone, and --out inside the deploy path is refused. A manifest item's image: rejects a digest. nktpValuesFile without an nktp item is a problem. The bootstrap's TPM checksum lookup calls the exported one. The test suite's mode check is portable and its order check can fail. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): refuse a checkout path with whitespace in the render The rendered chart.path is one unquoted token for the deploy path reader, so a checkout under a directory with a space rendered and then failed at install time. The render now reports it. The --out guard resolves symlinks before comparing with the deploy path. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * refactor(cli): export the TPM attestor checksum lookup as is Rename tpmPluginChecksum instead of wrapping it; the render tests for an empty checksum like the bootstrap does. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): refuse unknown item types and whitespace in absolute chart paths Items accepts only the four types the executor dispatches. The whitespace check covers an absolute committed chart.path too. The nested --out test runs on a copy of the deploy path. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(cli): keep the database password in the operator's file only controllerStack.database.passwordFile is required. A missing file is created with a generated password, 0600. The rendered tree holds no db-password copy. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): reference the SPIRE CA with chart.setFile instead of copying it A helm item's release.yaml takes chart.setFile: <helm key>=<absolute path> entries the executor passes as --set-file. The render points the spire item at the operator's CA files; spire/site-values.yaml holds no PEM. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(cli): name the credential files of a rendered deploy path The render lists the files under --out that hold a credential and writes a .gitignore that ignores the tree, so the operator knows what to delete and a repository does not pick it up by accident. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(cli): refuse a rendered deploy path under a shared temp directory --out under /tmp, /var/tmp, their /private forms or the process temp directory is refused before anything is written. Tests opt out through RenderOptions.AllowTempOut; the deploy suite through NVKECTL_RENDER_ALLOW_TEMP_OUT=1. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): keep temporal's passwords under a mirror and refuse incomplete site values A mirror merges into temporal's server values instead of replacing them. The render refuses a missing profiles image when the deploy path enables profiles.image, an empty secret file, a template value the templates cannot carry, an image override with no tag or digest, a template item with no template, and an item named . or ... A symlinked deploy path is resolved; copied files keep their owner exec bit. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
6334975cdf |
feat(cli): the site spec carries the controller stack install input (#1429)
The site spec gains an optional controllerStack section: node architecture, the NICo API, the registry pull secret, the tenant login and paths to the files that hold tokens and passwords. generate sitespec writes it with REPLACE_* placeholders, bootstrap site lists the ones still in the file, and nvkectl validate sitespec checks the whole file by section, so the install refuses a placeholder. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
0b4ff4ef30 |
chore: publish to the nvke-* NVCR repositories (#1520)
The publish workflows push nvke-controller, nvke-agent, nvke-agent-deb, nvkectl, nvke-controller-chart and nvke-os-image-* ; the controller Makefile default, the docs, the CLI help and the tests follow. The NICo overlay keeps its pinned nke-controller tag until a release tag exists under the new name, and the allowlist entry narrows to that pin and the pull secret. Closes #1519 Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |