mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
main
30
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
51dc0c4dae |
feat!: make apiAuth the only API authentication source (#1938)
apiAuth in nvke-controller-config becomes the only place the controller reads its API authentication configuration from. This is the breaking second step of phase 2. - The controller refuses to start when AUTH_CONFIG_PATH is set, naming apiAuth as the replacement, and passes authn.Setup only the apiAuth section. authn.Load and Options.ConfigPath stay for management-engine's --auth-config. - The chart no longer renders or mounts nvke-auth-config. It refuses apiAuth.configMap and an AUTH_CONFIG_PATH env entry by name, and a caBundlePath into the old mount, pointing at jwks.caBundle. - apiAuth.permissive requires apiAuth.enabled, in the chart and at startup. Tilt passes it only with authentication on. - controllerconfig, which decodes the apiAuth section, gets the decoder-strictness tests. - nvkectl and the token scripts keep their fallback to the authentication ConfigMap for controllers from before this change. - The e2e suite reads the enforcement mode from apiAuth alone. - The pod template carries a checksum of nvke-controller-config, so an upgrade that changes apiAuth rolls the controller without Reloader, which the NVKE stack does not install. - API authorization (#2125) counts authentication as on exactly when apiAuth.enabled is. BREAKING CHANGE: AUTH_CONFIG_PATH and apiAuth.configMap are removed. A site that managed its own authentication ConfigMap moves audiences and issuers into apiAuth.config, CA bundles into jwks.caBundle, and sets apiAuth.enabled. apiAuth.permissive without apiAuth.enabled is refused. nvkectl older than the previous step gets 401. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
a3a48718bb |
test(controller): refresh the CAPD e2e CAPNICo CRDs for v0.1.0 (#2364)
Signed-off-by: Payal Patel <payapatel@nvidia.com> |
||
|
|
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> |
||
|
|
ddab4187b5 |
feat: read API authentication from apiAuth first (#1935)
Prepare for apiAuth in nvke-controller-config to be the only source of the NVKE API authentication configuration. Nothing here is breaking; retiring AUTH_CONFIG_PATH and the external-ConfigMap mode follows once an nvkectl with this change is released. - nvkectl, the e2e token helper and hack/nvke-token.sh read apiAuth from nvke-controller-config first and fall back to the authentication ConfigMap when the section is off or absent. - permissiveMode moves to apiAuth.permissive, beside the rest of the section and matching the Helm value. A config.yaml that still sets the top-level key is refused with an error naming the new one. - Issuers take an inline jwks.caBundle as an alternative to caBundlePath, so a private CA no longer needs a file mounted from nvke-auth-config. - Tilt and the CAPNICo e2e path render the configuration from chart values, as CAPD already does, and their nvke-auth-dev manifests drop the ConfigMap. Nothing in the repository uses apiAuth.configMap.create=false any more. - The design document replaces its phase 2 outline with the design. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
e7ebbc4b1b |
feat(controller): read chart-rendered API authentication from nvke-controller-config (#1812)
When the chart renders the API authentication configuration (apiAuth.configMap.create), the controller now reads it from an apiAuth section of nvke-controller-config instead of the file at AUTH_CONFIG_PATH. auth/authn stays the only owner of the schema: the section reuses authn.Issuer and is validated with the new Config.ValidateStartup, which authn.Load also uses. The section is required and carries an explicit enabled switch, so a missing section is a startup failure rather than "off". A section filled in but switched off is refused, and enabling it while AUTH_CONFIG_PATH is set is a startup failure. A ConfigMap managed elsewhere keeps the AUTH_CONFIG_PATH path, and the chart still renders the authentication ConfigMap for nvkectl and extraFiles. The CAPD e2e lane moves to the chart-rendered configuration; Tilt and capnico-e2e keep the external ConfigMap, so CI covers both. The e2e suite and the token and demo scripts treat either source as authentication being on, whichever name the settings ConfigMap has. The auth-mode gauge now follows whether authn.Setup built an authenticator. Also renames the remaining references to the settings ConfigMap, nke-controller-config, to nvke-controller-config, the chart's default since #1769, in docs, comments, test messages and help text. Kept: the legacy pins and fallbacks for installs that predate the rename, and the "Loaded nke-controller-config" startup log line, which the e2e OIDC site helper matches and released images still print. Includes the design doc, controller/docs/api-auth-in-controller-config-design.md. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
789a42d745 |
feat(deploy): issue the OIDC upstream CA with the NVKE subject on new sites only (#1890)
* feat(deploy): issue the OIDC upstream CA with the NVKE subject on new sites only The CA's subject still said NKE. Changing it re-issues the CA with a new private key, which invalidates the trust anchor every tenant of an existing site has embedded, and nothing distinguished a first install from a re-run of `nvkectl ... install`. Add a create-if-absent directive to the manifest-item contract: a .yaml file naming `<kind>:<name>:<namespace>` is applied only when that object is not in the cluster. The probe is a read, so it runs under --dry-run too and a dry run still describes the install that would happen; a probe that fails for any reason other than NotFound stops a real install rather than read an unanswered API server as "absent", which is the direction that re-creates the object. Split the Certificate out of oidc-upstream-ca.yaml so the two Issuers beside it, which carry no key material, keep being applied every install, and gate the Certificate on its CA Secret -- the Secret holds the key material tenants trust. Then move the subject to NVKE. Closes #1863 Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Name the CA certificate, not its private key, as the trust anchor tenants embed, and say what the leaf losing its chain means. Say that the gate belongs to the executor: a tool that does not read the directive applies the Certificate and re-issues the CA. Add it as step 5 of what another executor has to do, with the GitOps shape of it. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@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> |
||
|
|
6f84d0e01b |
feat(chart)!: move the remaining chart names, mount paths and filenames to nvke (#1818)
* refactor(controller): move the controller pod's mount paths to /etc/nvke The controller pod mounts its authentication ConfigMap, its controller-config ConfigMap and its node-agent client identity under /etc/nke. Nothing outside the pod observes any of them: the chart owns both the mount and the path it joins into AUTH_CONFIG_PATH and CONTROLLER_CONFIG_PATH, and the client identity paths are compiled constants the chart's volumeMounts match. So the three move together with no values key and nothing for an existing site to pin -- an upgraded pod simply mounts them one directory over. Moved: /etc/nvke/auth, /etc/nvke/controller-config, /etc/nvke/node-agent-client-tls and the e2e mock's /etc/nvke/dsx-identity. Not moved: the node-side paths (/etc/nke/spire.env, /etc/nke/trust-bundle.pem, /etc/nke/controller-ca.crt, /etc/default/nke-agent). Those are the node contract, they are chosen per node from the agent's version, and they belong to #1497. While here, chart-node-agent-auth-assertions.sh asserted the absence of `mountPath: /etc/nke/node-agent-tls`, a path the chart never rendered under either name, so the check could not fail. It now names the real mount. Related: #1554, #1496 Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(chart)!: default the authentication ConfigMap to nvke-auth-config apiAuth.configMap.name was already a value an install can pin, so this moves only the default. A new install mounts nvke-auth-config; an install that predates the rename keeps nke-auth-config by pinning the key, which chart-legacy-pinned-values.yaml now carries and chart-auth-assertions.sh now proves. The consumer moved first. nvkectl discovers the API audience by reading this ConfigMap, and the name was a compiled constant, so flipping the default alone would have left one nvkectl unable to talk to the other kind of site. cli/internal/auth now searches both names in every controller namespace -- greenfield name first, pinned legacy name second -- in the same shape it already searched the two namespaces, because a site that pinned one of the two need not have pinned the other. Also moved with it, all of them internally consistent and none observable outside this repository: the e2e authtoken constant and the nvke-auth-dev scaffolding that creates the ConfigMap the suite reads, the two e2e copies of it, and the pod-internal volume names (nke-auth-config, nke-controller-config) in deployment.yaml. nvke-token.sh and nvke-auth-demo.sh take NKE_AUTH_CONFIGMAP, defaulting to the new name, alongside the NKE_CONTROLLER_CONFIGMAP that #1769 added. The chart's two env-refusal messages named nke-controller-config literally and so went stale whenever the value moved. They now interpolate controller.controllerConfig.name and say whatever the install configured. Related: #1554, #1496 Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(chart)!: name the chart nvke-controller Chart.yaml's name is the last path segment of the OCI repository helm pushes to, so this moves the published GHCR chart from ghcr.io/dsx-ai-factory/nvke/charts/nke-controller to .../charts/nvke-controller and the packaged tarball with it. It is an artifact-location change: what an install renders comes from nameOverride, not from here. chart-publish-nvcr.yml rewrites this line with an anchored sed before pushing, so its anchor moves too -- left behind, the rename would silently not apply and the chart would push to NVCR under whatever name Chart.yaml happened to carry. NVCR already publishes as nvke-controller-chart and is otherwise unaffected. malware-backfill.yml pulls the chart by path to scan published tags, including tags that predate this rename. It already chained fallbacks for the two earlier chart renames; the new name goes at the front of that chain. Not moved, deliberately: - image.repository. #1554 decision 2 settled that the chart moves and the image does not, so ghcr.io/dsx-ai-factory/nvke/nke-controller and the sed in chart-publish.yml that pins it stay as they are. - `component: nke-controller-chart` in the record-digest step. That is a key in the release manifest, read outside this repository, and nothing in #1554 calls for moving it. Related: #1554, #1496 Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(deploy)!: rename the OIDC upstream CA Issuer to nvke-oidc-upstream-ca The cert-manager Issuer that signs the OIDC discovery provider's leaf serving certificate. #1554 lists it as a Secret; it is an Issuer -- the Secret it reads is oidc-provider-upstream-ca and carries no nke. Renaming the Issuer is safe: spec.ca.secretName is unchanged, so the renamed Issuer signs with the same CA key, and nothing a tenant holds is derived from the Issuer's name. All ten references move together (deploy/nico, both e2e stacks, helm-values/spire.yaml, deploy/k8s, the Tiltfile and the identity exchange mock), so the issuerRef never dangles. NOT changed, and it needs a decision before anyone does: the CA subject (commonName "NKE OIDC Upstream CA", OU "NKE") on the Certificate in the same file. #1554 wants it moved "for new sites only", but these items are what `nvkectl ... install` applies, and the file's own comment says any subject change forces a re-issue with a new private key, which invalidates every tenant's embedded trust anchor. Nothing here distinguishes a new site from an existing one re-running install, so moving the subject would re-key the CA under an existing site. That gate has to exist first. Related: #1554, #1496 Signed-off-by: Terry Howe <thowe@nvidia.com> * refactor: rename the nke-prefixed chart templates and deploy manifests Filenames only. Nothing these files render changes: Helm takes no object name from a template's filename, and the two renamed Go files keep package nvkerbac and every identifier in it. templates/nke-rbac.yaml -> templates/nvke-rbac.yaml templates/rbac-nke-system.yaml -> templates/rbac-nvke-system.yaml deploy/k8s/nke-auth-dev.yaml -> deploy/k8s/nvke-auth-dev.yaml deploy/k8s/nke-spire-client.yaml -> deploy/k8s/nvke-spire-client.yaml deploy/k8s/spire-nke-services-spiffe-id.yaml -> spire-nvke-services-spiffe-id.yaml internal/nvkerbac/nkerbac{,_test}.go -> internal/nvkerbac/nvkerbac{,_test}.go and the e2e stacks' copies of the first three, whose directories were already named nvke-*. rbac-nke-system.yaml was named for the management namespace, which moved to nvke-system in #1698, so its filename was already one rename behind. Every reference moves with them, including the two Tilt resource names derived from the filenames (nke-auth-dev and spire-nke-services-spiffe-id), the _controller_resource_deps list that names both, and the resource_deps of two opt-in providers -- the dsx-identity-exchange mock and dsx-imds-attestation -- that wait on nvke-auth-dev. Those two matter more than they look. Tilt matches resource_deps by string and SILENTLY DROPS a name it does not know: with the stale name, the Tiltfile still loads and `tilt alpha tiltfile-result` still reports no error, but dsx-identity-exchange-ca comes out depending on ["oidc-upstream-ca-ready"] alone, having lost its wait on the scaffolding that creates the namespace it writes a ConfigMap into. That is a race, not a failure, and no lane would have caught it -- both providers are off by default. Verified by loading the Tiltfile against a kind cluster with the provider enabled, before and after. The allowlist entry for this group loses its `nkerbac` alternative, which now matches nothing, and its comment says why `nke-rbac` is still there: the ConfigMap's name is a compiled constant in that package, so it needs to become a chart value before the name itself can move. Related: #1554, #1496 Signed-off-by: Terry Howe <thowe@nvidia.com> * docs(chart): document the pins an existing site needs before upgrading Addresses both CodeRabbit findings on #1769, which are the same finding twice: the legacy pins existed in the test fixture and in the pull request body, but not where an operator planning an upgrade would read them. - nameOverride's doc comment was a plain `#` comment, so helm-docs never rendered it and the README's row for the one value that FAILS an upgrade was empty. It is now a `# --` comment and reaches the README. - controllerConfig.name said an install that predates nvke-controller-config pins "nvke-controller-config". It pins "nke-controller-config"; a rename in #1769 caught the legacy value too. This is the key sentence on the key the finding is about, and it was telling operators to pin the new name. - apiAuth.configMap.name, whose default moved earlier in this branch, gains the same note. - A new "Upgrading an existing site: names and identity" section collects every pin in one block, beside the management-namespace section that already existed, and says which failure mode each one has: nameOverride is rejected by the API server, the rest succeed and quietly leave something behind. - The README title was still nke-controller after this branch renamed the chart. The section states what the second finding asks for and what the fixture cannot: chart-identity-assertions.py proves the chart still honours the pins, not that any site supplies them, so the deployed values of all 41 sites have to be checked before a chart carrying these defaults is published. teleport.* is deliberately excluded from the pin block. Those defaults moved to nvke-* in #1563, in a chart every existing site already runs, and no site ever pinned them -- so pinning them now would be a behaviour change rather than a preservation, whatever their own value descriptions say. The section says so. Related: #1554, #1496, #1769, #1563 Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Three findings on the authentication ConfigMap search, all of them consequences of this branch adding a second name to look for. A denied read of the greenfield name no longer ends the search. RBAC scoped to resourceNames denies every name it does not grant, so a site pinned to nke-auth-config can deny nvke-auth-config while permitting the name it actually runs -- and with one name that denial was correctly terminal, while with two it stopped nvkectl before the readable one. Forbidden is now kept and the search continues; it is returned only if nothing turns out to be readable, so a denied read still never degrades into "authentication is off" and a bare request the controller rejects with a confusing 401. Any other error stays terminal. The regression test reproduces the reviewer's case and fails without the fix. A second test covers the other half: when no candidate is readable, the Forbidden is surfaced rather than reported as authentication being off. The e2e helper searched one name too. On a pinned site RawConfig found nothing, which does not fail a run -- it quietly turns the authn specs into assertions about an unauthenticated NVKE and skips the SPIRE one. It now searches both names, and ConfigMapName stays the name the suite's diagnostics quote. cli/README.md and cli/docs/user-flow.md named only nvke-auth-config. Both now name each ConfigMap the CLI looks for and state the narrower condition for sending no token: neither name found in either namespace. Both also say that an unreadable ConfigMap is not that condition. Signed-off-by: Terry Howe <thowe@nvidia.com> * style(cli): gofumpt the forbidden-reactor helper golangci-lint's gofumpt wants the closing paren of a split call on its own line. I checked the new test with gofmt, which accepts it; the gate is golangci-lint fmt (gci + gofumpt), which does not. Kept as its own commit rather than squashed into fd51855ea: the review replies on this pull request cite that SHA, and rewriting it would strand them. Signed-off-by: Terry Howe <thowe@nvidia.com> * docs: name the chart nvke-controller in the publication reference Two rows in artifact-publication.md still said the controller's chart is nke-controller. This branch moved the published chart to charts/nvke-controller while deliberately leaving the image at nke-controller, so a row naming both artifacts with one name is now wrong about the chart. - the NVKE_GITHUB_PUBLISH table listed "`nke-controller` image and chart" - the SBOM section listed the chart among "`nke-controller` and `nktp`" Every other nke-controller in the file is the image and stays. Reported on the chart-publish row; the SBOM row is the same defect one section further down. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix(e2e): make the legacy auth ConfigMap name a constant gochecknoglobals is on in controller/test/e2e and rejected the package-level slice the two-name search was reading: internal/authtoken/token.go:41:5: ConfigMapNames is a global variable LegacyConfigMapName joins ConfigMapName as a const and RawConfig ranges over an array literal of the two, so there is no package-level variable. Nothing else referenced the slice. I had run `make lint` for cli and not for controller/test/e2e, which is a separate module with its own lint job. Both now pass, as does controller -- the three modules this branch touches Go files in. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Keeps the authentication mount at /etc/nke/auth, and fixes the same Forbidden-stops-the-search bug in the e2e helper that was already fixed in the CLI. The mount path move was wrong, and my own commit message argued it was safe on a premise that does not hold. It claimed "nothing outside the pod observes either" path. An operator's auth.yaml does: jwks.caBundlePath is an absolute path into that mount, written by whoever configured the issuer, and it lives in their values or in a ConfigMap they supply. Pinning apiAuth.configMap.name preserves the ConfigMap's name but not where it is mounted. Confirmed by rendering the chart with a pre-rename configuration (caBundlePath: /etc/nke/auth/spire-ca.crt plus the matching extraFiles): the render SUCCEEDS and emits auth.yaml naming /etc/nke/auth/spire-ca.crt while mounting the file at /etc/nvke/auth/spire-ca.crt. The guard does not catch it either -- it only rejects an unlisted file under the current mount, so a legacy path reads as "a CA outside the mount" and is left alone. An enforcing controller then cannot load that issuer's CA, which is an authentication outage on upgrade, arriving silently. So /etc/nke/auth stays. The other three mounts this branch moved are kept at /etc/nvke: controller-config, node-agent-client-tls and the e2e mock's dsx-identity. Those are chart-owned or compiled constants -- checked that nothing outside the chart names them, and that the only values an operator can point into a mount are caBundlePath, which names the auth mount, and profilesDir/runbooksPath, which name a different one this branch never touched. authtoken.RawConfig had the same defect as cli/internal/auth did: it returned on a Forbidden read of the greenfield name and never tried the pinned one. It now keeps the denial, continues, and returns it only when no candidate is readable -- so a denied read is never reported as authentication being absent. Docs, all four of them saying something that is no longer true: - cli/docs/user-flow.md and cli/README.md said the first name that *exists* is used; it is the first *readable* one, and they now say why that differs. - controller/docs/configuring-api-authentication.md said nvke-auth-config is the single name fixed in the CLI, and that any read error stops the command. - controller/test/e2e/README.md said the suite sends no token when nvke-auth-config is missing; it sends none only when neither name exists. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@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> |
||
|
|
47478ebe8f |
feat: native LaunchLayer provider integration (#1543)
* feat(db): add LaunchLayer provider type and typed payload structs Per NKX-14085: native typed LaunchLayer integration, mirroring NICo's existing db-layer pattern exactly. Adds db.ProviderTypeLaunchLayer, LaunchLayerClusterProvider, LaunchLayerNodePoolProvider (reused for NodeSet, matching NicoNodePoolProvider's reuse), LaunchLayerControlPlaneProvider, and LaunchLayerNodeProvider, each with the standard XProvider()/SetX() accessor pair and clone helper. Extends every ResolveProviderType() switch with the new case, and every existing SetNico/SetCapi setter to null out the new LaunchLayer field too. New migration adds the launch_layer jsonb column to clusters, node_pools, node_sets, and nodes — control_plane_configurations needs no migration since its config column is already a single jsonb blob that can hold a new key without a DDL change. First of several commits implementing full LaunchLayer provider support (OpenAPI schema, internal/server wiring, the capability-client implementations, RBAC, and Tilt dev wiring follow). Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * feat(api): add LaunchLayer OpenAPI schema sections Per NKX-14085: mirrors NICo's schema pattern exactly — LaunchLayerClusterProvider, LaunchLayerNodePoolProvider (+Update), LaunchLayerNodeSetProvider (read-only), LaunchLayerControlPlaneProvider (+Update), LaunchLayerNodeProvider (read-only), plus the LaunchLayerClusterOwner/LaunchLayerSecurityGroup(Refs) nested shapes CAPLL's own cluster-level schema needs. Wires a launchLayer sibling field into the same ~10 container schemas nico is wired into, and extends every not:anyOf provider-exclusivity block from 2-provider to 3-provider logic (forbid every pair, plus forbid none on create-time schemas). make generate / make api-compat-check both pass clean — purely additive, no breaking change. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * feat(clients): implement the LaunchLayer capability client Per NKX-14085: new internal/clients/launchlayer package implementing all 9 ProviderClient capabilities, matching the existing capi/nico shape exactly (Client struct{} + New(), one file per capability). Registers a case db.ProviderTypeLaunchLayer in all 9 factory switches. CAPLL's own Go module (github.com/NVIDIA/cluster-api-provider-launchlayer) only resolves through this environment's internal proxy, not the real public proxy.golang.org — unlike cluster-api-provider-nico, which already made that transition. Per this repo's own "no internal dependency" rule, LaunchLayerCluster/LaunchLayerMachine manifests are built as plain JSON objects instead of importing CAPLL's typed API, the same approach the capi client already uses for a caller-supplied manifest, applied here to a controller-constructed one. Notable design points, each confirmed against the actual CAPLL repo (pulled fresh) rather than assumed: - CreateMachine calls deps.CreateSpireJoinToken/NodeAgentBootstrapFiles the same way the CAPI client does, not NICo's no-SPIRE path — CAPLL is a pure bootstrap-Secret pass-through (docs/profile-args.md), so SPIRE material has to already be baked into the cloud-init payload. - TryAdvanceStuckMachine and ResolveNodePoolUpgrade are no-ops, matching the CAPI client — CAPLL has no rotation/release-catalog concept. - UsesFMDSBGPPeerASN is always false — the VPC-prefix compatibility signal it reports on is a NICo-only concept. - ValidateNodePoolPayload/ValidateControlPlaneConfigPayload enforce instanceType required + hostOSProfile/vmProfile mutual exclusivity, matching #1387's content-validation pattern. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * feat(server): wire LaunchLayer into cluster/node-pool/control-plane dispatch Per NKX-14085: adds a third case to every provider-dispatch switch in internal/server — the request-shape-to-client-call mapping that #1387 established stays in server, not internal/clients. Covers: - clusters.go: create-time dispatch + field-presence validation (validateCreateLaunchLayerClusterProvider), the cluster->db and db->api conversions, the update-time mismatched-provider gate (generalized from a 2-way nico/infra check to 3-way), and the cluster-level control-plane instanceTypePreference-style update path (a no-op for LaunchLayer, since every field is immutable per CAPLL). - node_pools.go: create/update dispatch, field-presence validation, db<->api conversions for NodePool. validateUpdatedNodePool's clusterIsCAPIBacked() boolean dispatch is generalized to a proper 3-way switch — it was implicitly treating "not CAPI" as "Nico", which would have silently run NICo's disk-selection-strategy check against LaunchLayer node pools. - cluster_control_plane_config.go: the parallel control-plane-config dispatch, field-presence validation, and the "merged spec" validator. - node_sets.go / nodes.go: read-response conversions for NodeSet/Node. config.go: new InfraProviderLaunchLayer constant, added to the SUPPORTED_INFRA_PROVIDERS allowlist. Full test suite passes with zero regressions — confirms the clusterIsCAPIBacked generalization didn't change NICo/CAPI behavior. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * feat(chart): grant RBAC for the LaunchLayer CRDs Per NKX-14085: adds launchlayerclusters/launchlayermachines/ launchlayermachinetemplates to the capi ClusterRole, matching the existing nicoclusters/nicomachines entries — the controller creates and reads these objects directly (ClusterScaffold/MachineMaterialization), the same way it does for NICo's CRDs. Also adds the three CRD names to the apiextensions.k8s.io existence-check rule. helm lint / helm template both verified clean. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * feat(clients): add a 10th capability for the hard-reboot annotation key Per NKX-14085: the hard-reboot path (applyCAPIMachineRebootAnnotation) unconditionally wrote NVKE's own nke.nvidia.com/reboot annotation onto the generic CAPI Machine object. That works for NICo because CAPNico's --reboot-annotation flag is deployed configured to that same key — but CAPLL watches a hardcoded infrastructure.cluster.x-k8s.io/reboot-requested key with no configurable override (confirmed by reading CAPLL's own controllers/instance_lifecycle.go), so the same unconditional write would silently never trigger a LaunchLayer reboot. New RebootAnnotationProvider capability (10th on ProviderClient, registered the same way as the other 9) resolves the right key per provider. CAPI/NICo keep today's key unchanged — this is a new dispatch point, not a behavior change for them, confirmed by the full test suite passing with zero regressions. Added a dedicated test proving a LaunchLayer-backed node gets CAPLL's key, not NVKE's. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(controllerconfig): recognize launchLayer as a supported infra provider The chart-mounted controller config validator still only accepted "nico" and "infra" for supportedInfraProviders, so a deployment that enables the LaunchLayer provider fails config validation at startup. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(tilt): fix nico dev-loop install script against current kind/helm kind load docker-image fails against this node image's containerd 2.3.x ("unknown containerd config version: 4 (supported versions: 2 and 3)"): kind parses `containerd config dump`'s live, migrated schema version, which containerd 2.3.x reports as 4 even though the on-disk config file still says 2. Load the image through ctr directly instead, the same mechanism kind uses internally, skipping its version check. helm upgrade/install also no longer takes --server-side=false on the Helm build pinned here; drop it. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * feat(tilt): add local Tilt dev-environment wiring for the launchlayer provider Mirrors hack/nico-provider/'s shape: a new hack/launchlayer-provider/ Tiltfile plus an install-capll.sh script that builds the CAPLL manager and fake-API images from a local cluster-api-provider-launchlayer checkout, deploys the chart and the 3-service fake LaunchLayer API (VPC, Compute, security groups) into the shared kind cluster, and wires the provider into the root Tiltfile's provider-plugin system and supportedInfraProviders list. Verified end-to-end against a live Tilt session: a LaunchLayerCluster and control-plane LaunchLayerMachine provision against the fake API and reach Ready/Provisioned, and the new mutual-exclusivity and content validators correctly reject malformed requests. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(api): waive the structural api-compat break in the Update not-blocks Forbidding a third provider pair on UpdateClusterControlPlaneConfig and UpdateNodePoolRequest needs their bare `not: {required: [...]}` turned into `not: {anyOf: [...]}}`. The structural differ reads that as the original `required` property being removed, but no request valid under the old schema becomes invalid: every pair it forbade is still forbidden, and the new pairs only involve the brand new `launchLayer` field, which no existing client could have been sending. Tried keeping `not.required` untouched and adding the new pairs via a sibling `allOf` instead (logically equivalent by De Morgan's), since that avoids the compat break without a waiver. It breaks oapi-codegen's generated type for both schemas into an untyped interface{}, so it is not viable here. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(chart): split nico and LaunchLayer RBAC into their own files A deployment that enables only one typed provider was still getting ClusterRole permissions for the other's CRDs and for LaunchLayer's, since capi.rbac.create granted all of them unconditionally. Split rbac-capi.yaml's nico and launchLayer rules into their own ClusterRole/ClusterRoleBinding pairs, each independently gated by a new capi.rbac.nico / capi.rbac.launchLayer value (both default true, so capi.rbac.create=true keeps granting everything it did before unless a deployment opts a provider out). rbac-capi.yaml keeps the provider-agnostic CAPI rules (machines, clusters, the finalizers subresource) and the provisioned-provider rules, which this change leaves alone. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * revert: drop the unneeded kind-load ctr workaround The "unknown containerd config version: 4" failure was my local kind CLI (v0.29.0) being too old for this node image's containerd 2.3.x, not a repo-level incompatibility -- confirmed by testing plain `kind load docker-image` again after upgrading to kind v0.33.0, which loads cleanly with no workaround. Revert both scripts to the plain kind-load call; keep the --server-side removal from the same earlier commit, since that one is a real mismatch against the Helm build pinned here and is unrelated to the kind version. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix: close three LaunchLayer gaps the lint exhaustiveness checks caught - internal/kube/tenant_client.go: ClientForDBCluster had no case for db.ProviderTypeLaunchLayer and fell into the "unsupported provider type" default, so any code path needing a LaunchLayer cluster's tenant client would have failed outright. LaunchLayer clusters have no pre-tenant-access legacy path to fall back to, so this always goes through clientFromTenantAccessSecret, same as CAPI. - internal/server/clusters.go: createInitialNodePools copied Nico and Infra from each initial node pool's config into the create request it builds, but not LaunchLayer -- a LaunchLayer cluster created with initial node pools would have silently dropped their launchLayer payload. - internal/server/node_pools.go: validateUpdatedNodePool's switch routed anything that wasn't CAPI or LaunchLayer to Nico's validator through its default case, rather than naming Nico explicitly -- the same implicit-default pattern already generalized elsewhere this epic. A genuinely unknown future provider type would have silently gotten Nico's validation instead of being rejected. Also extracted UpdateCluster's controlPlaneConfig provider-match rejection into validateUpdateControlPlaneConfigProviderMatch: adding the LaunchLayer branch pushed the function to cyclomatic complexity 49 / maintainability index 19 (confirmed this function was lint-clean on main before this branch's changes), well past this repo's linters. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * style(clients): fix golangci-lint findings in the launchlayer package - goconst: the "name" JSON-manifest key appeared 3 times across scaffold.go/machine.go; extracted nameKey. - grouper: two ungrouped single const declarations. No behavior change -- caught by CI's lint job, not run locally before this fix since make lint was never run as part of local verification during implementation. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(api): add missing property descriptions and fix exhaustruct in test/e2e The controller/api lint job runs the openapi-lint spec linter in addition to golangci-lint; it failed with 15 property-description-present violations across the LaunchLayer schemas (securityGroups, securityGroupRefs' two fields, and all four fields each on LaunchLayerNodePoolProviderUpdate, LaunchLayerNodeSetProvider and LaunchLayerControlPlaneProvider -- descriptions existed on the base Create-variant schema but were never copied onto its Update/NodeSet/ControlPlane siblings). test/e2e is a separate Go module with its own golangci-lint job; nodePoolRequest had the same Nico/Infra-but-not-LaunchLayer gap internal/server/clusters.go's createInitialNodePools had, caught by exhaustruct in that module's own lint run rather than controller's. Neither of these ran as part of local verification during implementation -- make lint only covers the controller module, not controller/api or test/e2e, which are separate Go modules with their own golangci-lint jobs in CI. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(name-check): allowlist the embedded swagger blob's incidental hits oapi-codegen embeds the full OpenAPI spec in controller/api/server.gen.go as a gzipped, base64-encoded blob for /openapi.yaml to serve at runtime. Adding descriptions to the LaunchLayer schema in this PR reflowed that blob's bytes and happened to produce a 3-character, case-insensitive "nke" token inside it by chance -- not a name reference, and not something any future spec edit is guaranteed to avoid either. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(api): make LaunchLayer node-pool fields fixed at creation, like NICo LaunchLayerNodePoolProviderUpdate exposed all 5 of its properties (instanceType, hostOSProfile, vmProfile, fulfillmentStrategy, securityGroupRefs) while its own description called all 5 "fixed at creation" -- a contract the server never enforced. Updating any of them silently persisted and could trigger a replacement node set with the changed creation-fixed settings (code-review finding, "Major"). NICo already solves this same problem for its own fixed-at-creation fields (instanceTypeID, partitions, sshKeyGroupIDs) by not exposing them in NicoNodePoolProviderUpdate at all, rather than conditionally allowing them up to some point and rejecting them after. Match that precedent instead of building new Compute-submission-state tracking NVKE has nowhere else: LaunchLayerNodePoolProviderUpdate now carries no properties, same shape LaunchLayerControlPlaneProviderUpdate already had. node_pools.go's applier becomes a no-op for launchLayer, matching the existing no-op already written for the control-plane side. Fixed both Update schemas' descriptions to drop the "once a Compute request has been submitted" conditional language that was never enforced. Also added the missing LaunchLayer case to nodePoolReplacementConfigChanged (code-review finding, "Minor"): its switch fell through to the "assume changed" default for LaunchLayer, so an unrelated field change (e.g. maxSurge alone) on a LaunchLayer node pool could incorrectly be treated as needing a replacement node set, which NodePoolNeedsNewNodeSet and validateControlPlaneRollout could then act on. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(temporal): mark the reboot-annotation provider lookup non-retryable clients.GetRebootAnnotationProvider returns a deterministic error for an unsupported cluster.ProviderType -- a pure in-memory switch, no I/O and no transient cause. The activity returned it unwrapped, so Temporal's default retry policy would retry it indefinitely, unable to ever succeed (code-review finding, "Minor"). a.GetCluster's own error is left alone: it already wraps a "not found" error as non-retryable internally. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(name-check): drop the now-dead server.gen.go allowlist entry The schema edit in the previous commit reflowed server.gen.go's embedded swagger blob again, and this time it does not contain an incidental "nke" token -- so the entry added for the last reflow now matches nothing and fails the check as dead, per name-check.py's own design (an allowlist entry must match a real, current hit; it cannot stand as a guard against a hypothetical future one). If a later openapi.yaml edit reflows the blob into containing a hit again, that needs its own fresh entry at that time, not a reinstatement of this one. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(clients): remove SPIRE join-token attestation from LaunchLayer deps.CreateSpireJoinToken already only mints a token when a node is specifically configured for join-token attestation (code-review comment), so this wasn't creating tokens unconditionally. But CAPLL is the production-target provider here, unlike CAPI (dev/test-only), so leaving join-token attestation reachable for it even as a configurable option is the real risk, not just whether it's the active default. CreateMachine no longer calls deps.CreateSpireJoinToken at all. renderBootstrapUserData rejects a node configured for join-token attestation outright, with a LaunchLayer-specific error, instead of silently proceeding to render a SPIRE agent config with no join_token value and no NodeAttestor plugin at all -- which is what would have happened just from removing the template's join-token branches without this guard. The template itself drops the join_token stanza and its NodeAttestor, so there is no path to one reachable even if the guard were ever bypassed. Tested all three attestation methods (tpm, dsxImds, and the join-token rejection) against the actual rendered template output, plus the existing SPIFFE-disabled no-op path. Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(launchlayer): register SPIRE identity and node identity for LaunchLayer machines Nothing wrote nke.nvidia.com/spire-agent-spiffe-id-path onto a LaunchLayer-backed Machine, so on a SPIFFE-enabled site MachineSpireEntryController never created its ClusterStaticEntry and the node agent could never authenticate. LaunchLayerSpiffeController now writes it before join. The path is the dsx_imds agent ID DSX gives a LaunchLayer bare-metal instance, /spire/agent/dsx_imds/tenant/<orgID>/bm/<instanceID>, built by the LaunchLayer client's new SpireAgentPathProvider capability from LaunchLayerCluster.status.vpc.orgID and LaunchLayerMachine.status.instanceID, so the controller holds only the watch and Machine wiring. A test drives a SPIFFE-enabled LaunchLayer Machine through both controllers to its ClusterStaticEntry. A SPIFFE-enabled LaunchLayer node can attest only through dsxImds: the Compute API reports no TPM endorsement key, and join-token is not offered for this provider. The new NodeAgentProfileValidator capability holds that rule in the LaunchLayer client. Cluster creation rejects a LaunchLayer cluster with 400 on a deployment whose node-agent profile the rule refuses, instead of accepting a cluster whose nodes never join. CreateMachine checks the node's own pinned profile again, now before anything is applied, and returns ErrUnsupportedMachineConfig, which the activity marks non-retryable, so a rejected node no longer retries forever leaving an orphan LaunchLayerMachine. The post-ready identity readback wrote every provider's instance IDs into node.Nico. It now goes through NewNodeProvider.ApplyObservedNodeIdentity, so a LaunchLayer node records instance, machine and rack IDs in its launchLayer payload, and the provider clients read their own status fields. NICo and CAPI behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(server): reject a launchLayer payload on NICo and CAPI pool updates UpdateNodePoolRequest promises a 400 for a provider payload that does not match the pool's cluster, but the NICo and CAPI branches never checked launchLayer, so PATCH {"launchLayer":{}} on such a pool succeeded and changed nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(hack): keep --server-side=false on the CAPNICo Helm installs Dropping it switched the CAPNICo installs to server-side apply under the pinned Helm 4.2.4, for the NICo e2e lane and Tilt, where the later kubectl patch of the manager args can conflict on a rerun. The change was unrelated to LaunchLayer; this restores main's version of the script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * docs: document the LaunchLayer provider and how to enable it The Clusters tag and the infrastructure-providers page still said NICo was the only provider, while the API reference and chart RBAC present launchLayer. Both now describe it, and the page covers enabling it: supportedInfraProviders, capi.rbac.launchLayer, and dsxImds attestation on a SPIFFE-enabled deployment. The supportedInfraProviders comment names launchLayer, and the chart README gains the capi.rbac.nico and capi.rbac.launchLayer rows with the updated capi.rbac.create and supportedInfraProviders descriptions. The controller README gains a LaunchLayer Tilt section. The node-pool schema says "at most one" of hostOSProfile and vmProfile, matching the validator, and the control-plane provider is "Fixed at creation." Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix: guard a nil LaunchLayer pool update and document capi.rbac.create validateUpdateLaunchLayerNodePoolRequest dereferenced a nil update body, which the surrounding update path treats as a no-op. The generated HTTP handler never passes nil, but the validator now matches its callers. The LaunchLayer RBAC renders only when capi.rbac.create and capi.rbac.launchLayer are both true, and capi.rbac.create defaults to false, so the enabling steps now list it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(server): close LaunchLayer validation gaps Several LaunchLayer requests were accepted with 201 and only failed later, inside CAPLL or at node join, where nothing reports the cause back to the caller. Node-pool create and a control-plane desiredCount increase now run the same node-agent profile check as cluster create, through one shared function. A cluster created while SPIFFE was off could otherwise gain pools or control-plane nodes after SPIFFE was enabled with tpm or joinToken, and every one of those nodes would fail to join. Cluster create now rejects security groups that CAPLL's CRD would refuse: the name pattern and length are in the schema, and the server checks that networkType is set exactly for VIRTUALIZED groups, that names are unique, and that a VIRTUALIZED group is not placed in a BARE_METAL VPC. Without this, ApplyCAPIClusterResources gets 422 and the provisioning workflow retries forever. securityGroupRefs on node pools and the control plane must name one of the cluster's groups, and cloudProviderEnabled true is rejected because NVKE runs no cloud controller manager to set the Node's provider ID. The schema now marks siteID and instanceType as required, which the server already enforced, and corrects descriptions that claimed NVKE applies CAPLL's vpcType default or that some fields stay mutable. No published API tag contains a LaunchLayer schema, so this is not a breaking change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(launchlayer): register the SPIFFE controller by CRD, skip it without SPIFFE, apply in order LaunchLayerSpiffeController was registered only while supportedInfraProviders listed launchLayer. That list gates admission of new clusters; removing launchLayer from it to stop new clusters also stopped the controller, so scale-ups and replacements on existing SPIFFE clusters never got an agent path and never joined. The controller now runs whenever the Machine and LaunchLayerMachine CRDs are installed. SpireAgentPath ignored node.SpiffeEnabled. With SPIFFE off and the method left at dsxImds it still wrote a path and requeued every 30 seconds while the organization was pending. It now supplies no path without SPIFFE. CreateMachine built the CAPI Machine after applying the LaunchLayerMachine and the bootstrap Secret, so a build error left both behind and was retried, contrary to its comment. Every object is now built before the first apply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * docs: correct LaunchLayer enablement and Tilt setup The site guide and chart docs described a LaunchLayer setup that does not work as written. nodeAgent.spireAttestationMethod applies to every provider's new nodes, and NICo accepts any method, so the guide's "nico,launchLayer" example would pin a TPM-attested NICo site's new nodes to dsxImds; they would fail only when they attest. The guide and the supportedInfraProviders value now say so, and tell operators to append launchLayer to the existing value rather than replace it. The guide also omitted settings the deployment needs: operatorTenant and endpoint with dsxImds, the SPIRE server's dsx_imds node attestor and the node-side agent plugin and checksum, tenantAccess.enabled (LaunchLayer reaches the tenant API only through that Secret), and keeping capi.rbac.launchLayer true while CAPLL's CRDs exist, now that the LaunchLayer SPIFFE controller is registered by CRD. capi.rbac.nico=false likewise requires the NICo controllers to be off. The "Order Matters" section now names CAPLL and the fourth CRD-gated controller. The controller README's LaunchLayer Tilt example set only the attestation method, which the chart refuses to render without operatorTenant; it now enables the dsx-imds-attestation provider, which sets everything. The Tiltfile header lists the launchlayer provider, the capnico-crds fixture no longer claims the chart grants NICo RBAC unconditionally, and the chart provider assertions cover a nico,infra,launchLayer value and both RBAC toggles. The four LaunchLayer waivers now record controller/api/v0.0.45, the newest published API tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * docs: describe NICo as the default provider, not the only one The API reference, the site guide and the chart describe LaunchLayer as a supported provider that a deployment accepts once its operator enables it, but five other places still said NICo is the only infrastructure provider: the preview-status limitations, the NICo provider page, the installation plan, the supported-platforms table and the docs glossary. They now say NICo is the default and LaunchLayer is supported once enabled, linking to the LaunchLayer enabling section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * refactor(launchlayer): adopt the nvke.nvidia.com keys #1713 moved NVKE's label and annotation keys into internal/keys: they are written under nvke.nvidia.com and read under either domain. The rebase onto it left this branch on the removed constants. LaunchLayerSpiffeController reads host-id and the SPIRE agent path with Value and writes the path with String(), as NicoSpiffeController does. The reboot key had become a list on main (both domains, so CAPNICo keeps reacting while its --reboot-annotation names the legacy key), while this branch's RebootAnnotationProvider returned one key. It now returns HardRebootAnnotationKeys: both domains for NICo and CAPI, which keeps main's behaviour, and CAPLL's one fixed key for LaunchLayer. The activity writes each key to request a reboot and drops them to clear it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * feat(launchlayer): implement TenantAPIAccess and NodeMachineIDLabel #1684 added both capabilities to ProviderClient with CAPI and NICo implementations, so GetProviderClient failed with "unsupported provider type" for every LaunchLayer cluster, not only at tenant access and node labelling. LaunchLayer reaches the tenant API through the published tenant-access Secret (it has no node-agent fallback), and its machine-ID label is the physical machine ID CAPLL records, empty on virtual machines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * refactor(clients): compose every capability in ProviderClient ProviderClient composes every settled capability, as the #1684 review pointed out, but NodeAgentProfileValidator and SpireAgentPathProvider were outside it. GetProviderClient now resolves both, and its test checks every capability for CAPI, NICo and LaunchLayer. The reboot-annotation activity and LaunchLayerSpiffeController have the cluster in scope, so they resolve the root client instead of calling a single factory. The API validators keep their factory calls, as main's other validators do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * fix(launchlayer): reject vmProfile and check pool scale-up for node-agent profile A SPIFFE-enabled LaunchLayer node attests through DSX IMDS, which identifies bare-metal instances only. A vmProfile node got a /bm/ agent path it could never attest to and hung. ValidateNodeAgentProfile now takes the node pool and rejects vmProfile unless external mTLS carries the node-agent connection without an SVID. NICo and CAPI ignore the pool. The check runs on every path that adds nodes: - node-pool create and cluster create (each initial pool) - the control plane at cluster create and scale-up, through the pool ControlPlaneConfigNodeProvider builds from its spec - node-pool scale-up through desiredNodeCount, which was not checked before - CreateMachine, for a node created outside the API An unknown provider in a control-plane update now gets "unsupported cluster provider" instead of "please provide " with an empty name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * refactor(launchlayer): drop checks the API and NVKE already guarantee buildInfraMachine re-checked instanceType, which the schema and the node-pool and control-plane validators already require. readStatusString checked the group and kind of infrastructure references NVKE writes itself, on a controller that only runs for LaunchLayer clusters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> * chore: satisfy interfacebloat and wastedassign ProviderClient has one accessor per settled capability, so it grows past the linter's 10 as capabilities move into it; it carries a reasoned nolint like the agent client. The provider-match switch now returns on an unknown provider, so its empty initial values were never read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Meet Vadaria <mvadaria@nvidia.com> --------- Signed-off-by: Meet Vadaria <mvadaria@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> |
||
|
|
a037fc56e1 |
refactor(dev): name the dev kind cluster controller-capi, with trust domain controller-capi.nvke.local (#1700)
make capd-up and tilt up stop with delete instructions when they find the old cwe-capi cluster. The five places that derive the trust domain from the kind cluster name move to .nvke.local together, so Tilt, CI and the e2e harness agree. Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
3a41793510 |
fix(e2e): point the deploy item lists at the renamed nvke-* directories (#1471)
#1453 renamed the nke-auth-dev and nke-spire-client deploy directories but left their entries in both nvke-deploy.yaml item lists, so the CAPD and NICo lanes stop at the second item. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
6029bf16ab |
chore: say NVKE in the comments and display text that still said NKE (#1470)
* chore: say NVKE in the comments that still said NKE The word NKE in comments becomes NVKE: Go comments through the token scanner, so no string literal moves; proto doc comments, with the generated *.pb.go files regenerated by `make -C agent protos`; and the comment lines of YAML, shell, Make, Tilt, systemd, Packer, Nix and template files. The provisioned provider's CRD description comes from a doc comment, so `make -C cluster-api-provider-provisioned manifests` and `make -C cli provider-manifest` regenerated the CRD and the CLI's embedded copy of it. Kept on purpose: the comment quoting the "NKE Agent Version:" line the updater parses, and the comments about the NGC organisation that is named NKE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * chore: say NVKE in the display text that still said NKE User-facing text that carried the word NKE now says NVKE: nvkectl help text; log, error and condition messages; Ginkgo suite and spec names; deb and OCI package metadata; systemd unit descriptions; workflow step names and input descriptions; Helm render failures; and the nine Markdown lines the prose sweep (#1462) missed. The tests that assert these strings move with them. Kept on purpose, because something parses or persists them: the "NKE Agent Version:" and "NKE Agent Updater Version:" lines the updater reads; the "update NKE RBAC:" errors of the UpdateNKERBAC rpc; the 2025 migration text; the OIDC upstream CA's CN and OU, since re-issuing that CA would break tenant trust; the nico-sim tenant "Forge-Tenant-NKE"; the Keycloak lab realm; and the NGC organisation that is named NKE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
668bc38a9b |
feat(cli)!: rename nkectl to nvkectl, keeping the old names for one release (#1456)
The binary, its directory, its config directory and its environment variables take the new name. For one release the previous names still work: every NVKECTL_* setting is also read under its NKECTL_* name with a deprecation warning (the NKECTL_CWE_* names of the generation before are no longer read), a config file left under nkectl/ is read and copied to nvkectl/ once, and releases publish both nvkectl-<os>-<arch> and nkectl-<os>-<arch>, to GitHub and to S3 under the existing prefix. The e2e helper package, the e2e test, the smoke and fetch scripts and the bootstrap e2e workflow follow the binary; the fetch script accepts a release that carries only the old asset name. The CLI's own documents and the two installation documents that print the download URLs change with it. Kept on purpose: the NVCR repository name until an nvkectl repository exists in the NGC org, the S3 prefix the publishing role's policy names, and the prose in the other documents. BREAKING CHANGE: the CLI is installed and invoked as nvkectl. The previous binary name, environment variable names and config directory are honoured for one release, as described above. Closes #1455 Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
3e8ca2590f |
refactor: rename the Go identifiers, packages and fixture paths that carried the old product name (#1453)
After the repository rename and the module-path change (#1449) the tree still carried the old name where it is ours alone: Go identifiers, two internal package names, import aliases, fixture and test-data directories, the e2e deploy overlays and a few deploy and hack scripts. None of these is a wire protocol, a persisted name or a user-typed value, so they change now, before the repository goes public, without a migration. Identifiers change as tokens, through a go/scanner pass, and in comments only on word boundaries, so every string value stays: NamespaceNVKESystem is still "nke-system" and the env and json struct tags keep their keys. Generated files are untouched and regenerate identically. The packages controller/internal/nkerbac and controller/test/e2e/internal/nke move with their import paths; the e2e deploy overlays, the nke-deploy.yaml files, deploy/nke-deploy.sh, deploy/lib/nke-deploy-items.py and the two hack scripts move with every reference; the twelve management-engine test-data directories move with the test prefixes that select them. Kept on purpose: the NKECluster types and their schema tests (the CRD kind), the UpdateNKERBAC rpc names and their tests (from the proto), the SubjectNKE release subject, agent/pkg/nkeauth and its record magic, and every nkectl name, which moves with the binary. Closes #1452 Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
a5ac8947e3 |
chore(chart): say controller, not CWE, in chart and deploy-path comments (#1395)
Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
db9fef93ab |
refactor(deploy): move the customer deploy path and its executor to deploy/ (#1291)
* refactor(deploy): move the customer deploy path and its executor to deploy/ The customer-facing deploy path lives at deploy/nico, and the script that installs a deploy path lives beside it as deploy/nke-deploy.sh, with its item parser and template renderer under deploy/lib/. The e2e deploy paths and the controller's own charts stay under controller/deploy/. The executor takes one flag for the deploy path, --deploy-path DIR, instead of a parent directory and a target name. The e2e lanes and the site suite call it that way; the workflows that watch controller/deploy/ now watch deploy/ too. Co-developed-by: Claude <noreply@anthropic.com> * chore(github): label and own deploy/ like controller/deploy/ Co-developed-by: Claude <noreply@anthropic.com> * chore(deploy): name the renamed executor and helpers in comments deploy-sbom.sh is deploy-stack.sh and build/render-template.py is deploy/lib/render-template.py. The runner layout comment describes what backend-e2e.sh stages now: deploy/ and controller/deploy/. Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
03cba1060d |
feat(dev): run Tilt and the e2e deploy paths with the nke-controller greenfield profile (#1271)
* feat(dev): run Tilt and the e2e deploy paths with the nke-controller greenfield profile Tilt and the capd-e2e, capnico-e2e and nke-sbom deploy paths install the controller the way a greenfield site does: release, namespace, Deployment, Service and ServiceAccount nke-controller; SPIFFE ID /nke-service/nke-controller; Temporal namespace nke-controller and queue nke-controller-tasks; database nke-controller; and the field-manager, managed-by and Teleport label/prefix values in nke-controller form. backend-e2e.sh no longer branches on Tilt versus deploy path. The e2e harness package internal/cwe is now internal/controller and defaults to nke-controller. The CWE_* settings the dev loop, CI scripts and e2e suite read are renamed NKE_CONTROLLER_*; the old names are still read for one release, including when the new name is set but empty. hack/nke-token.sh and hack/nke-auth-demo.sh find the controller in nke-controller, then cloud-workflow-engine, as nkectl does. The Tilt values file, Dockerfile, kind config and CAPD RBAC manifest are renamed to say controller. The host-debug .env.local.example and README example point at the nke-controller database, Temporal namespace and queue, and the NKTP kind-validation doc queries the controller's metrics, logs and traces under nke-controller. Tilt stops with a recreate-the-cluster message on a cluster that still runs the old release cwe in cloud-workflow-engine. The kind cluster name cwe-capi and the nico-vms bridge cwebr0 are unchanged; renaming them would force every developer to recreate their cluster or leave a stale bridge. Chart defaults are unchanged, so existing sites keep their names. The nke-sbom path now installs on a fresh cluster only, and its README says so: nothing migrates an install from an earlier revision. Signed-off-by: Aaron Patten <apatten@nvidia.com> * fix(dev): name the controller's local SPIFFE ID and auth doc examples nke-controller scripts/dev-env-spire.sh registers the host-run controller under the ServiceAccount the cluster runs it as: nke-controller when that ServiceAccount exists in namespace nke-controller, else cloud-workflow-engine. The kubectl examples in docs/authenticating-to-the-api.md use Tilt's names and say what to use on a site that still runs the old name. The comments at the cwe-capi and cwebr0 defaults describe the deferred rename without an internal tracker reference, which docs-check rejects. Signed-off-by: Aaron Patten <apatten@nvidia.com> --------- Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
7899f40eb4 |
refactor(nkectl): name the bootstrap deploy package and API client after the controller (#1327)
Rename cli/internal/bootstrap/cwedeploy to controllerdeploy, cli/internal/cwe to cli/internal/controller, clients.CWEClient and CWEClientFn to ControllerClient and ControllerClientFn, and the bundled cwe-values.yaml and cwe-nodeport.yaml to controller-values.yaml and controller-nodeport.yaml. Update every path-bound reference: the cli/Makefile ldflag that stamps capiVersion, the CAPD e2e path filters, the root Makefile's provider manifest change detection, the regenerated provider manifest header, README links and path comments. No behaviour change. Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
0d1d2a5541 |
fix(controller): give the kubeadm bootstrap controller SPIFFE tenant access (#1331)
Tenant kubeconfig Secrets use SPIRE exec auth, but the exec-auth overlay, ClusterSPIFFEID namespaces, and nke:capi-cluster-admin binding covered only the core, kubeadm control-plane, and CAPD controllers. The kubeadm bootstrap controller could not reach tenant clusters to create join tokens, so replacement workers never provisioned. Signed-off-by: Eric Staples <estaples@nvidia.com> |
||
|
|
c3fad3abff |
test(ci): use ovn-kubernetes in the default container lane (#1192)
* test(ci): use ovn-kubernetes in the default container lane Signed-off-by: Chao Chen <chaoch@nvidia.com> |
||
|
|
765eca0775 |
feat(deploy): install the controller as nke-controller in the deploy paths (#1173)
* feat(deploy): install the controller as nke-controller in the deploy paths The controller/deploy deploy paths (nke-sbom, capd-e2e, capnico-e2e) install the controller as nke-controller, the name nkectl bootstrap site and greenfield sites use. The release namespace, namespaceOverride, fullnameOverride, nameOverride and serviceAccount.name are nke-controller, and the SPIRE admin ID, both ClusterSPIFFEID namespace selectors, the base-config Namespace, nke-auth-config, the CAPD RBAC subject and the nke-spire-client URL follow. nke-sbom also names its tenant credentials, ServiceMonitor and tracing service after it. backend-e2e.sh takes the controller's name from its install mode (nke-controller for a deploy path, cloud-workflow-engine under Tilt) and passes it to the e2e suite and the nkectl smoke. deploy-sbom.sh and the e2e full-site deployer set the SPIRE admin path to /nke-service/nke-controller. In the e2e suite the Deployment, container, ServiceAccount and tenant SPIFFE path follow CWE_SERVICE. The Tilt dev loop, the chart's defaults and controller-internal identity values are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aaron Patten <apatten@nvidia.com> * test(e2e): look up the SBOM controller chart by nke-controller TestSBOMAgainstDeployPath renders the nke-sbom deploy path at HEAD, which names the controller's namespace, Service and Deployment nke-controller. The controller chart subtest looks them up by controllerName rather than the cwe package defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aaron Patten <apatten@nvidia.com> --------- Signed-off-by: Aaron Patten <apatten@nvidia.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7b9155e5c5 |
feat(deploy): attest Kata workloads on the site SPIRE agent (#1026)
* feat(deploy): attest Kata workloads on the site SPIRE agent Site controller nodes are all control-plane nodes and run Kata, so a workload runs inside a VM where the SPIRE agent cannot walk the caller's cgroup back to a container ID. The k8s workload attestor then produces no container-scoped selectors and the workload gets no SVID. Set disableContainerSelectors so attestation stops at pod scope, which still resolves under Kata. The ClusterSPIFFEIDs here are registered on pod UID by the controller manager, so those identities are unaffected. Refs CNT-7898. Signed-off-by: jgriffith <jgriffith@nvidia.com> * feat(deploy): pin the k8s workload attestor on explicitly enabled: true is the chart default at 0.30.1, so this changes nothing today. Restated on review: disableContainerSelectors is meaningless if the k8s attestor ever stops rendering, and an upstream change of that default would remove workload attestation with nothing in this repository to show for it. Refs CNT-7898. Signed-off-by: jgriffith <jgriffith@nvidia.com> * feat(cli): match the bootstrap SPIRE values to the deploy paths The ephemeral Kind cluster nkectl bootstraps was the one values file this repository owns that still took the chart defaults. It runs runc and lives about five minutes, so neither key changes anything there. Set them so every values file attests identically, and so an upstream change of either default surfaces as a conflict here too. Refs CNT-7898. Signed-off-by: jgriffith <jgriffith@nvidia.com> --------- Signed-off-by: jgriffith <jgriffith@nvidia.com> |
||
|
|
b433b4ea23 |
refactor(cli): move the bootstrap-only packages under internal/bootstrap (#1017)
Six packages exist only for `bootstrap site`: bootstrapengine, cwedeploy, sitespec, sitecluster, etcdkey and spireentrydump. They move under cli/internal/bootstrap/, so cli/internal separates what serves the bootstrap from what serves the site-controller client. bootstrapengine becomes bootstrap/engine and is imported under its former name; the others keep theirs. A pure move: import paths, the paths in cli/Makefile, the root Makefile, controller/Makefile.dev, hack/mirror-bootstrap-images.sh, the capd-e2e push glob and the e2e-pr-path-filter regex that must stay in step with it, docs and comments, and one relative path in a test. No code changes. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
d5aa34e511 |
fix(e2e): set the soft-reboot flag on the deploy-path lanes (#1031)
The capd-e2e and capnico-e2e deploy paths carried no CWE env, so NODE_REBOOT_SOFT_REBOOT_ENABLED fell back to its true default. A container node cannot reboot in-guest, so the node never restarted and the reboot spec timed out on both lanes. The Tilt lanes were unaffected: the Tiltfile forwards the variable. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
b341d97b1e |
feat(deploy): replace the composition generator with three hand-authored deploy paths (#812)
* feat(composition): install the CAPD e2e lane from a generated SBOM deploy path
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor(build): retire nke-stack.sh install and its phase helpers
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(deploy): hand-author the capd-e2e deploy path, one release per component
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(build): per-item values and a spire chart materialiser
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor(build): drop the umbrella's registry half, which nothing invoked
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(ci): install the CAPD e2e lane from deploy/capd-e2e
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor(composition): drop the capd-e2e target, now hand-authored under deploy/
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor(build): retire nke-stack.sh, keeping only the spire materialiser
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(ci): create the staging root before copying into it, and drop the spire release override
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor: delete the generation layer
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(deploy): follow the controller chart's rename to nke-controller
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(deploy): add the capnico-e2e deploy path
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(deploy): make CAPNICo an item of the capnico-e2e deploy path
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(build): render template items against a BootstrapConfig
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(ci): let deploy-sbom.sh drive capnico-e2e as well as capd-e2e
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(deploy): carry CAPNICo's CRDs, and patch the CAPI controllers after spire
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* docs(site-bootstrap): add .Nico to the BootstrapConfig reference
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(ci): run capnico-e2e from its deploy path, with CAPNICo outside it
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(ci): default the NICo lane to its deploy path
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(deploy): drop the Helm ownership metadata from capnico-system
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(ci): run the E2E lanes when the deploy path changes
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(deploy): accept both provider blocks on the capnico-e2e lane
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(deploy): add the capnico-forge deploy path, proven on az61
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor(deploy): install spire from the published chart, drop spire-chart.sh
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(deploy): stop the SPIRE webhook race failing every e2e lane
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* docs(build): mark the three SBOM scripts transitional, tracked in #873
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* build: add licence headers to the two SBOM python scripts
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor(deploy): move the deploy paths under controller/deploy
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* feat(deploy): pin the controller image and the postgres digest on capnico-forge
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* docs(deploy): describe the reference run without naming the site
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(ci): pass the SPIRE attestation method #850 made required
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* docs(deploy): drop references to internal repos, docs and scripts
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(deploy): accept both provider blocks on the site path too
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* refactor(deploy): rename capnico-forge to nke-sbom
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* docs(deploy): say NICo site rather than naming the backend
Signed-off-by: Jayson Du <jaydu@nvidia.com>
* fix(deploy): pin the controller image to a build past the SPIRE change
The nke-sbom path pinned ghcr.io/dsx-ai-factory/nke/controller:v0.1.1-rc.6,
which predates #850 by nine days. #850 removed
infra.spireAttestationMethod from the cluster and node-pool APIs and moved
the choice to nodeAgent.spireAttestationMethod in this chart's own values,
so a site controller running any image built before it rejects this
checkout's nkectl with
400 Bad Request: infra.spireAttestationMethod is required
at "creating the site cluster".
GHCR cannot supply a fix today: it publishes release tags only, and no
release has been cut past #850 -- its newest, rc.8, is revision
|