mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
pull-request/2414
12
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2a12d95f2d |
feat(controller): let a node pool update set its NVLink logical partition (#2147)
* feat(controller): let a node pool update set its NVLink logical partition
PATCH /api/nodePools/{id} now accepts nico.nvLinkLogicalPartitionID. It sets
or replaces the pool's NVLink logical partition; the all-zero UUID is
rejected, so the partition cannot be cleared. Nodes the pool creates after
the update attach to the new partition. A partition change does not create a
new node set, so no existing node is replaced.
A NicoMachine that already exists keeps the partition it was created with
when its create is retried, because CAPNICo rejects a partition change once
the instance exists.
The NICo provider guide shows how to attach a pool's existing nodes by
updating their NICo instances directly.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs(nico): set the NICo token and check each instance after an NVLink update
Read the NICo API path and token from the nico-credentials Secret, list pool
machines that have no instance yet, and add a step that confirms each instance
reports the partition on every GPU.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* fix(controller): create a node set when a pool's NVLink partition changes
Treat the NVLink logical partition like the other editable node
configuration: a change creates a new current node set, and each node gets
the partition of its own node set instead of the pool's live value. Nodes
created after the change attach to the new partition; existing nodes stay in
the earlier node set until they are replaced or patched in NICo.
A retried create renders from the same node set, so the separate retry guard
is no longer needed and is removed.
Node sets backfilled when the nico payload columns were added never carried
the partition. A migration copies each pool's partition into its node sets
that lack it, so the upgrade creates no node sets and new nodes keep their
partition. Before this change the partition was fixed at creation, so the
pool's value is the one every node set was created with.
The node set API reports the partition, and the NICo provider guide describes
the node set and recycling behavior.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* test(nico): render a node's NVLink partition from its node set across retries
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs(nico): keep the NICo token off the curl command line in the NVLink procedure
Read the Authorization header from a file only the operator can read, build
the request body once and reject a GPU count below 1, print the response body
of a failed update and say which failures a retry can fix.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs: move the NVLink partition procedure to its own operate page
Changing a node pool's NVLink partition and attaching its existing nodes is an
operational task, not part of configuring the NICo provider at install. Give it
a how-to page in the Operate section that also shows the pool update itself,
and link to it from the NICo identifiers table.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs: stop on a failed pool update and skip attached instances
Signed-off-by: Aaron Patten <apatten@nvidia.com>
---------
Signed-off-by: Aaron Patten <apatten@nvidia.com>
|
||
|
|
6aa5166b3c |
feat(launchlayer): support external security group IDs (#1831)
Signed-off-by: Giuseppe Laguteta <glaguteta@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> |
||
|
|
3317737e1e |
refactor(api): rename the OS profile surface to releases (#1612)
* refactor(api): rename the OS profile surface to releases /osProfiles becomes /releases and nico.osProfile becomes nico.release, so the REST API uses the release vocabulary the rest of the management plane already does. Internal db and workflow structs keep their field names. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> * refactor(controller): rename the OS profile to the release Nico payloads gain a release key. os_profile is still written alongside it and still read as a fallback, so a CWE predating the rename keeps reading and writing the value through a rolling upgrade or a rollback. No stored data changes. A later release backfills release from os_profile, then drops the mirror and the fallback. The os_profile Prometheus label is deliberately unchanged. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> * docs: follow the OS profile rename The request YAML in the workload-cluster guides named a field the API no longer accepts, and two troubleshooting entries quoted error text that no longer appears. The dashboard panel descriptions in operate/observe.md keep the old wording: the panels and the os_profile metric label they read are unchanged. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> * fix(scripts): read cluster NICo fields from .nico and allow an absent configProfile The cluster-level orgID, siteID and vpcID live under .nico in the API response, as the node pool fields already corrected do, so the script exited before generating anything. configProfile is optional in the same schema, and requiring it skipped a valid node pool. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> --------- Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> |
||
|
|
4409efc29b |
build: move the Go module paths and repository URLs to dsx-ai-factory/nvke (#1449)
The repository was renamed from dsx-ai-factory/nke to dsx-ai-factory/nvke on 2026-10-10. Its id is unchanged, so guards, rulesets, environments and the OIDC subject carried over, and GitHub redirects the old URLs. The tree still named the old repository where the name is a contract rather than a URL: the module lines of the 12 Go modules and about 1,700 import lines, the proto go_package (embedded in node_agent.pb.go, regenerated here), both THIRD_PARTY_NOTICES.md files (regenerated), the lint local-prefix and depguard entries, ldflags, the go-licenses ignore lists, the documented repository URLs and gh commands, and the ghcr.io/dsx-ai-factory/nke image paths in workflows, the chart default and the e2e defaults. Only the organisation and repository segments change. Directories, identifiers, binary, image, chart, package, label, namespace and environment variable names, the CODEOWNERS team slugs and CHANGELOG.md stay as they are. Closes #1448 Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
8e8023f5af |
feat(controller)!: configure SPIRE attestation at deployment (#850)
- remove SPIRE attestation selection from cluster and node-pool APIs - add deployment-wide Helm configuration with TPM as the default - use controller configuration for CAPI bootstrap and join-token creation - add chart assertions for the deployment contract BREAKING CHANGE: Cluster and node-pool API requests no longer accept spireAttestationMethod. Configure nodeAgent.spireAttestationMethod in controller Helm values instead. Signed-off-by: Vivin Wilson <vwilson@nvidia.com> |
||
|
|
2ab60c7f6b |
refactor: move the module path to github.com/dsx-ai-factory/nke (#896)
* refactor: move the module path to github.com/dsx-ai-factory/nke All nine modules still declared github.com/NVIDIA/nke after the org move, so the two documented consumer go get lines resolved only through GitHub's org-rename redirect. 1391 occurrences across 593 files, plus two lines in vendor/modules.txt. Replaced by exact string, never by pattern: github.com/NVIDIA/nke is never a prefix of anything else here, and the three other NVIDIA modules this repository depends on -- ncx-infra-controller-rest, infra-controller, and a bare github.com/NVIDIA/ in a GOPRIVATE pattern -- are untouched. The generated proto could not be renamed by substitution and was regenerated. node_agent.pb.go embeds go_package in a length-prefixed descriptor, so the length byte changes with the string: 0x2d to 0x35. check-protos caught it. THIRD_PARTY_NOTICES.md for the root and agent were regenerated too. Verified: GOPROXY=off make build links all six binaries, work-check-offline reports vendor consistent with every module, and agent, cli, controller, controller/api, controller/nico-sim, controller/hack/capd-reboot-controller, os-image and cluster-api-provider-provisioned all pass through make. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix: catch up two things the module-path rename missed workspace: controller/go.mod's require block and vendor/modules.txt still had the two local requires (agent, controller/api) at their old sort position. Ran make work-sync to re-sort both under their new github.com/dsx-ai-factory/nke path. lint: cli/.golangci.yml and os-image/.golangci.yml pin gci's local group to prefix(github.com/NVIDIA/), which no longer matches the renamed local imports -- gci moved them into the third-party group and flagged every file that imports across modules. Repointed both at prefix(github.com/dsx-ai-factory/nke), the same scope goimports uses in controller/.golangci.yml. No source file needed reformatting: the import order was already correct for a config that recognized the new path. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
b7e39a7ba7 |
refactor(controller): fully decouple from flat legacy provider fields (#668)
This fully decouples the controller from the legacy flat provider columns. Every read of a cluster, node pool, node set, node or control-plane spec now goes through the nested nico/capi payload, and nothing derives, copies from, or falls back to the flat columns any more. The writes stay, because the old binary still needs them. Set* mirrors the payload onto the flat columns exactly as it does on main. The reason is that the previous release still carries SyncProviderFields, which rebuilds the nested payload from the flat columns on every write. So during a rolling upgrade, where both versions run against the same database, and on any rollback, the old binary reads a row this release wrote and reconstructs the payload out of those columns. Keep writing them and it reconstructs a correct payload; leave them empty and it reconstructs an empty one, destroying the row's provider data. Continuing to write them is what makes this release backward compatible. After this lands the columns are inert: still populated, read by nobody, and ready to be deleted. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> |
||
|
|
b6a25000fa | refactor(restapi)!: nest provider fields under nico and infra payload (#246) | ||
|
|
a3c868615c |
fix(license): normalise SPDX headers to Apache-2.0, and assert it (#197)
* chore(license): normalise SPDX headers to Apache-2.0 [machine generated] MACHINE GENERATED. Every added line in this commit is `SPDX-License-Identifier: Apache-2.0` and nothing else; every removed line is the identifier it replaces, or the notice paragraph that followed it. Verified: 0 added lines are anything other than that SPDX line. 829 files. The repository ships Apache-2.0 -- LICENSE says so and GitHub reports it -- while 676 Go files and 153 others declared a different identifier, followed by a notice that contradicted it. The copyright line, the comment style and the indentation are left alone. Files carrying the short form, two SPDX lines with no notice paragraph, have the identifier swapped and nothing else. Markdown is excluded: there the identifier appears in prose describing the mismatch rather than in a header, so rewriting it would turn the sentence into a tautology. That file is handled in the next commit. Three shapes needed care, and each is worth knowing about if this is ever repeated. controller/api/prepend-license.go carries the block inside a Go raw string, so the paragraph's last line ends with a backtick; the closing delimiter is carried back onto the SPDX line rather than dropped, or the string would be left unterminated. Two shell scripts under controller/hack/ word the final sentence differently, so matching on the common ending alone misses them. And controller/.golangci.yml prefixes each line with "# //", which has to be stripped before the paragraph text can be recognised. The templates that produce these headers are rewritten here too, so this commit is self-consistent: the five addlicense boilerplates, the five goheader templates in .golangci.yml, and the block in prepend-license.go. Every header in the tree now names the same identifier. Review the next commit. This one is a substitution. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(license): one header template, and a check that reads it The previous commit fixed the headers. This one stops them drifting again, and is the part worth reviewing. Nothing here could catch a header that named the wrong licence. addlicense only ADDS a header to a file that has none; it never rewrites one already present. So `make file-license-check` runs addlicense, finds every file already stamped, produces no diff, and passes -- whatever the header says. agent/ is the proof: its template and its check have both been correct all along, and six of its files disagreed with them. Three mechanisms defined the header and could disagree with each other: an addlicense boilerplate per module, a goheader template in five .golangci.yml files, and a hardcoded block in controller/api/prepend-license.go that stamps generated API code. They are now one file, hack/license-header.tmpl, and every module reads it. make license-header-check replaces the per-module matrix and asserts two things rather than one: that a header exists, and that it names Apache-2.0. The second assertion is what this repository never had. Verified by planting a different identifier in a file and confirming the check fails and names it. Modules resolve the template through `git rev-parse --show-toplevel`, not a relative path. A relative ../hack path silently changes meaning when a module moves, which is how cli/ broke when it moved out of controller/. The file set is the union of what the per-module targets already ignored, so this covers exactly the files stamped today. 120 files carry no header at all -- generated output, testdata, fixtures, build tooling, three .github files -- and widening the set to reach them is a separate change. Mixing headers that are WRONG with headers that are MISSING would hide both. Dockerfiles stay out: addlicense keys off the file extension and gives Dockerfile.proto C-style // comments, which Docker cannot parse. AGENTS.md's licence-header rule now describes the current state: one identifier, added by `make license` rather than copied from a neighbouring file. The ban on relicensing as a side effect of unrelated work stays. The header-check job is renamed from "License headers (<module>)" to "License headers". The merge gate calls this workflow whole rather than naming its jobs, and the branch ruleset requires only `gate` and `DCO`, so no required check changes name. Verified: GOPROXY=off make build links all five binaries with no credentials; golangci-lint goheader reports 0 issues on cli and controller; `make license` is a no-op in all five modules; make license-header-check passes over 828 files and fails on a planted mismatched header. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> stderr is not captured when reading addlicense's output. addlicense prints the offending paths to stdout, while `go run` writes "go: downloading ..." on a cold module cache and "exit status 1" on failure -- both to stderr. Folding the two together reports a module download as a file with no header, which is how the first CI run of this check failed while passing on a machine whose cache was already warm. Reproduced locally against an empty GOMODCACHE. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
fd95309ade | chore: re-sync cwe from gitlab (#136) | ||
|
|
7ce92b69ce | feat: import cloud-workflow-engine (#7) |