mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
main
91
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ce31e1ce52 |
revert: "feat(controller): accept controlPlaneEndpoint on cluster create (#2515)" (#2594)
Signed-off-by: Nathan Herz <nherz@nvidia.com> |
||
|
|
a3cd922847 |
feat(controller): support cniPlugin none to create a cluster with no CNI (#2551)
Adds the `none` CNI plugin: a cluster created with `cniPlugin: none` is provisioned with no CNI and no kube-proxy, for users who bring their own CNI. This covers the controller end to end: the API enum and validation, the init path, DNS and the node user-data. nvkectl and docs are not part of this PR. A `none` cluster's nodes stay NotReady until the user installs a CNI, so day-2 controllers that wait on `KubernetesReady` (remediation, scale-down quorum accounting, cert renewal) hold off until then. That is unchanged here. |
||
|
|
bf25577b9f |
feat(controller): accept controlPlaneEndpoint on cluster create (#2515)
* refactor(controller): ask one cluster method at each control-plane endpoint gate Each gate that scales, upgrades or replaces control-plane nodes tested the control-plane VIP for an empty string by itself. The gates now call db.Cluster.HasStableControlPlaneEndpoint, which is true when the cluster has a VIP. The gates are the count check at create and scale, the upgrade and rollout checks of the cluster API, the node delete guard, the control-plane controller (recycling, remediation, rebalance, stuck pending nodes) and the node pool controller (surge, NodeSet replacement). No behavior changes. A later change adds a second kind of stable endpoint to the method. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): add controlPlaneEndpoint to the cluster API schema A cluster can name an API server endpoint that NVKE does not manage, for example a load balancer in front of the API servers. The create request gets the optional object controlPlaneEndpoint. Its type says who manages the endpoint, and the block named after the type carries what that type needs. This change has one type, External, with a host and an optional port in the external block. The port defaults to 6443. The cluster response returns the type and the resolved host and port. The update request has no such property, so the value is fixed at creation. The shape is the one of the proposal for a load balancer as the control plane endpoint, and this change is its first part. The enum of the type has only External. The other types of the proposal come later. A new enum value passes the API compatibility check, and a removed one does not, so the enum lists only what the code does. The existing descriptions change only where the new field makes them wrong or incomplete: - The overview of the Clusters tag and the description of controlPlaneVIP say which address is the API server endpoint. - Seven sentences that say an operation requires controlPlaneVIP now name both fields. Each is one changed line. - The 400 list of the create operation gets the new reasons. - The desiredNodeCount descriptions of the two node pool requests lose their sentence about control-plane pools. The node pool handlers refuse each create and each update of a control-plane node pool, so no request reaches a rule on that count. This change is only api/openapi.yaml and the code that make generate writes from it (models.gen.go, server.gen.go). The handler does not read the field yet. The next changes store it, check it and use it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): store controlPlaneEndpoint in the clusters table The clusters table gets three nullable columns for the API server endpoint that a cluster was created with: control_plane_endpoint_type, control_plane_endpoint_host and control_plane_endpoint_port. db.Cluster gets the fields ControlPlaneEndpointType, ControlPlaneEndpointHost and ControlPlaneEndpointPort. The type says who manages the endpoint. The one type is External, an endpoint that NVKE does not manage. The host and the port are the resolved endpoint. A cluster without the field stores NULL in the three columns, which is what each existing row has after the migration. An empty type marks such a row. control_plane_vip does not change. No handler writes the fields yet and no workflow reads them. The test proves that the values come back from a read and stay in the row through an update of the cluster. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): count controlPlaneEndpoint as a stable endpoint at each gate db.Cluster.HasStableControlPlaneEndpoint is now true for a cluster with an endpoint of the type External, as it is for one with a VIP. Each gate that scales, upgrades or replaces control-plane nodes asks this method, so the one line opens them all: scale-up, upgrade and rollout in the cluster API, node delete, recycling, remediation, rebalance, stuck pending nodes, surge and NodeSet replacement. The method reads the stored type and not the host. An empty type is a cluster without the field, and a type that this controller does not know is no stable endpoint. The tests run each gate with such a cluster. Recycling, remediation, rebalance and stuck pending nodes share one check, controlPlaneReplacementBlocked, which gets its own test. The 400 messages and the log warnings of the gates keep their text. Each of them is given only for a cluster with no VIP and no controlPlaneEndpoint. allowControlPlaneWithoutVIP keeps its meaning and its default. No cluster has the field yet, because the create request does not store it. A later change adds that, with the count check at create. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): check controlPlaneEndpoint on cluster create The create request is now rejected with 400 when it has both controlPlaneEndpoint and controlPlaneVIP, when the type is not External, when the type External has no external block, and when the host or the port is not valid. The host is a DNS name or an IPv4 address. A DNS name is lowercase, has at most 253 characters, no trailing dot and no wildcard. An IPv4 address must be unicast, not loopback and not link-local, and outside the pod and service CIDRs. The port is a number from 1 to 65535, and 6443 when the request has none. A host of only digits and dots must be a valid IPv4 address, so that a mistyped address does not pass as a DNS name and skip the address rules. A DNS name is not checked against the CIDRs, because NVKE cannot tell which addresses it resolves to. The host is not trimmed. NVKE does not resolve or dial the endpoint. The CIDR rule of controlPlaneVIP moves into a helper that both fields use. Its messages keep their text, and the checks of controlPlaneVIP do not change. The checks come before the change that stores the value, so that no commit stores a value without them. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): use controlPlaneEndpoint for kubeadm init kubeadm init now takes its controlPlaneEndpoint from one function, kubeadmControlPlaneEndpoint. For a cluster with an external endpoint the value is host:port. Without one it is the kube-vip VIP, then the IP of the initializing node, as before. The value goes into the ClusterConfiguration and into the request to the node agent, as before. NVKE also names the host of an external endpoint in apiServer.certSANs of the ClusterConfiguration. kubeadm adds the host of its controlPlaneEndpoint to the API server certificate by itself. The explicit entry keeps certificate renewal and control-plane joins correct if that default changes. A cluster without an external endpoint gets no certSANs entry, so its configuration does not change. The step fails for a cluster row with an endpoint type that this controller does not know, and for an external endpoint with no host or no port. The address goes into each certificate and each kubeconfig of the cluster, so the step does not guess. The kube-vip step needs no change and gets no check for the new field. It returns with no action for a cluster without a VIP, and a cluster with a controlPlaneEndpoint has no VIP: the create request refuses the two fields together, and no other request writes either of them to the cluster row. One test keeps this true: for such a cluster the step makes no kube-vip call and runs no script on the node. Each later step reads the endpoint back from what kubeadm wrote: the join string, admin.conf and the Cluster API endpoint. They need no change. No cluster has the field yet. The next change makes the create request store it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(controller): accept controlPlaneEndpoint on cluster create The create request now stores controlPlaneEndpoint in the cluster row: the type, the host and the resolved port, which is 6443 when the request names none. The cluster response returns the type and the resolved host and port. The response leaves the field out when the cluster has none. The count check at create asks HasStableControlPlaneEndpoint of the fields that the request would store. So a request with an external endpoint can ask for more than one control-plane node, as one with a VIP can. The tests go through the service and through the HTTP handler with the OpenAPI validator: at each level requests that are accepted and requests that are refused, then the bounds that only the schema checks, and a PATCH with the field, which the schema refuses. One test checks the JSON form of the field in the response. The full table of refused values is in the test of the check itself. This change comes after each part that reads the value, so that no cluster can have the field before kubeadm init uses it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs: describe controlPlaneEndpoint for workload clusters The pages that state the VIP rule now name controlPlaneEndpoint as the second way to give a cluster a stable API address: the cluster spec table and the count rule in the create guide, the API address in the two access pages, the upgrade rule in the supported platforms, and the installation plan. The create guide shows the object with the type External, its host and its port, and says what the response returns. It says what the endpoint must do before the request, and that NVKE does not resolve or call the endpoint when it accepts the request. The access page says that NVKE does not take a node out of the endpoint before it restarts the API server or etcd there, so the health check of the endpoint must do it. The pages come after the change that stores the value, so that each sentence is true when it is added. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(controller): reject a DNS label over 63 characters in controlPlaneEndpoint The host check of an external control plane endpoint used IsDNS1123Subdomain, which checks the whole length and the form of a DNS name and not the length of each label. So a name with a label of 64 characters passed the check, and DNS has no such name. The check now also rejects a label of more than 63 characters. The text of the field in the spec says so, and the generated code follows it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs: say that an endpoint health check acts after the failure The access page said that the endpoint must stop traffic to a node through its own health check. A health check sees a failure only after it happens, so a call can fail between the restart of the API server or of etcd and that check. The page says so now. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
407218a442 |
feat(controller): adopt the cluster the NVKE controller runs (#2415)
* feat(controller): adopt the cluster the controller runs on behind a flag
Add POST /clusters/self-adopt, which records the cluster the controller runs
on as a cluster NVKE manages, without running kubeadm init. The endpoint is
served only when clusterSelfAdoptionEnabled is set in nvke-controller-config
(chart value clusterSelfAdoptionEnabled, default false). Otherwise it answers
400.
The controller reads the cluster with its own service account: the
control-plane Nodes, each with an InternalIP, and the Kubernetes version and
pod and service CIDRs from kube-system/kubeadm-config. The request carries
only what NVKE cannot read: name, NICo site and VPC (orgID optional), CNI
plugin and version, and etcdEncrypted. While the flag is on, the chart grants
that service account list on Nodes and get on kube-system/kubeadm-config.
Self-adopt returns 400 for no control-plane node, a node without an
InternalIP, a kubelet that differs from kubeadm-config, a version that is not
X.Y.Z, no or unsupported pod or service CIDRs, a second adoption, or an
existing Cluster API Cluster of the same name.
The adopted control plane stays with its operator, outside NVKE. Adoption
marks the cluster and its control-plane nodes as adopted, records desiredCount
as their number with no control-plane machine settings, and turns off
recycling, automatic scale-down and rebalancing:
- PATCH /clusters/{id} refuses turning those back on, controlPlaneConfig.nico,
controlPlaneKubernetesVersion, any desiredCount change and any control-plane
rollout field.
- DELETE /nodes/{id} on an adopted node returns 409, refused in the handler.
- The node-status sync never marks an adopted node for recycling, so
control-plane remediation never replaces it.
DELETE /clusters/{id} on an adopted cluster removes only NVKE's records and
leaves the cluster running. It returns 409 while the cluster has node pools,
so their workers are drained and released through the node pool delete first.
TeardownCluster then deletes the Cluster API Cluster and NicoCluster and the
adopted node and cluster rows, and never tears down a node.
An adopted cluster gets OIDCAuthEnabled false, since NVKE cannot configure its
API servers. Its provisioning workflow applies only the Cluster API scaffold:
node-local DNS and the Pod Security namespace labels stay with the operator.
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
* fix(controller): keep maintenance off an adopted cluster and serialize self-adopt
Address review on the self-adopt change.
Keep NVKE from changing an adopted control plane in place:
- PATCH /clusters/{id} refuses turning on enableEtcdEncryption or enableOidc
for an adopted cluster, alongside the existing control-plane refusals.
- Scheduled certificate renewal skips an adopted cluster.
- stableControlPlane refuses an adopted control plane, which keeps on-demand
certificate renewal and etcd key rotation off it.
Make "adopts at most one cluster" hold across concurrent requests:
SelfAdoptCluster takes a transaction-scoped advisory lock (LockSelfAdoption)
and checks for an adopted cluster again inside the transaction that records
it, so a second adoption gets a 400. Also fix a stale comment that said an
adopted record cannot be deleted.
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
---------
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
|
||
|
|
2e7cfb59c0 |
docs(controller): document and pin that custom CIDRs require an explicit CNI plugin (#2526)
* test: pin that an empty CNI plugin has no default version Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> * fix(controller): accept custom CIDRs when the CNI plugin is omitted An omitted cniPlugin is stored as ovn-kubernetes, but the CIDR check saw the raw empty value and required ovn-kubernetes by name. Check the effective plugin instead. Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> * docs(controller): document that custom CIDRs require an explicit CNI plugin Revert the effective-plugin check so an omitted cniPlugin keeps being refused custom CIDRs, state the rule in the OpenAPI descriptions, and pin it with a handler row for each side. Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> * fix(management-engine): tidy go.mod for cedar-go v1.9.3 Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> --------- Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> |
||
|
|
445bde08f9 |
feat(controller): accept enableCPNodeRecycling on cluster create (#2453)
* feat(controller): accept enableCPNodeRecycling on cluster create Add enableCPNodeRecycling to CreateClusterRequest and store it on the new cluster. Previously the field could only be set with PATCH, so an operator could not opt in at create. The e2e nvkectl rows now create with the flag set and check that the controller stored it. The existing patch spec sets the flag to false so that its check is meaningful. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): skip the create-time recycling check on a reused cluster A reused cluster is not created by the run, so initCluster sends no create request and the flag may already have been patched to false by an earlier run. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): register the create-time recycling check only on fresh runs A reused cluster was not created by this run, so its create-time flag is unknown. Skipping the spec at run time reported a skip from nvkectl_test.go, which e2e_assert_no_new_skips rejects. Leave the spec out of the tree on reused runs instead. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): read the reuse setting before the spec tree is built test.cfg is assigned inside the creates-the-cluster spec, which runs after the tree is built, so the guard read an empty ReuseCluster and always registered the create-time check. Load the config file when the tree is built instead. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): patch to the opposite of the stored recycling flag A reused cluster can already hold the value the patch sets, so an ignored patch still passed. Read the stored value first and patch to the opposite, so the assertion holds on reused clusters too. Signed-off-by: Meha Mehta <meham@nvidia.com> --------- Signed-off-by: Meha Mehta <meham@nvidia.com> |
||
|
|
c1ef896e22 |
feat(controller): expose observed node pool counts (#2400)
* feat(controller): expose observed node pool counts (poc) Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): keep node pool counts with pool queries Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): name compared node set current Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use a generic json equality helper name Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use inner join for node set counts Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use node set names in count aggregation Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): consolidate node pool response mapping Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * docs: keep node pool field definitions in the api reference Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): restore single node pool response conversion Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): colocate node pool count tests Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): colocate node pool response count tests Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(api): name observed node pool count explicitly Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(controller): compare template JSON numbers by exact value Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): limit JSON comparison to node pool counts Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): restore shared pool configuration comparison Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): move json equality to shared utils Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): use unambiguous numeric precision fixtures Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): simplify node pool count responses Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * perf(controller): index nodes by node pool Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> --------- Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> |
||
|
|
dd1ed438ce |
build: bump the go-dependencies group with 8 updates (#2370)
* build: bump the go-dependencies group across 1 directory with 8 updates Bumps the go-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/prometheus/common](https://github.com/prometheus/common) | `0.73.1` | `0.74.0` | | [golang.org/x/crypto](https://github.com/golang/crypto) | `0.58.0` | `0.59.0` | | [github.com/cedar-policy/cedar-go](https://github.com/cedar-policy/cedar-go) | `1.9.0` | `1.9.2` | | [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) | `0.152.0` | `0.153.0` | | go.temporal.io/api | `1.64.2` | `1.64.3` | | go.temporal.io/sdk | `1.50.0` | `1.51.0` | | [golang.org/x/mod](https://github.com/golang/mod) | `0.42.0` | `0.43.0` | | [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.311.0` | `0.315.0` | Updates `github.com/prometheus/common` from 0.73.1 to 0.74.0 - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/common/compare/v0.73.1...v0.74.0) Updates `golang.org/x/crypto` from 0.58.0 to 0.59.0 - [Commits](https://github.com/golang/crypto/compare/v0.58.0...v0.59.0) Updates `github.com/cedar-policy/cedar-go` from 1.9.0 to 1.9.2 - [Release notes](https://github.com/cedar-policy/cedar-go/releases) - [Commits](https://github.com/cedar-policy/cedar-go/compare/v1.9.0...v1.9.2) Updates `github.com/getkin/kin-openapi` from 0.152.0 to 0.153.0 - [Release notes](https://github.com/getkin/kin-openapi/releases) - [Commits](https://github.com/getkin/kin-openapi/compare/v0.152.0...v0.153.0) Updates `go.temporal.io/api` from 1.64.2 to 1.64.3 Updates `go.temporal.io/sdk` from 1.50.0 to 1.51.0 Updates `golang.org/x/mod` from 0.42.0 to 0.43.0 - [Commits](https://github.com/golang/mod/compare/v0.42.0...v0.43.0) Updates `google.golang.org/api` from 0.311.0 to 0.315.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.311.0...v0.315.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.74.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/crypto dependency-version: 0.59.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/cedar-policy/cedar-go dependency-version: 1.9.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/getkin/kin-openapi dependency-version: 0.153.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.temporal.io/api dependency-version: 1.64.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: go.temporal.io/sdk dependency-version: 1.51.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/mod dependency-version: 0.43.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: google.golang.org/api dependency-version: 0.315.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * build: regenerate notices and workspace, move to DescribeWorkflow Regenerate the third-party notices and go.work.sum for the dependency bumps. Replace the deprecated Temporal DescribeWorkflowExecution with DescribeWorkflow, which the Temporal SDK 1.51.0 bump flags under SA1019. Signed-off-by: dbudris <dbudris@nvidia.com> * build: align workspace manifests after rebase and migrate the gofail teardown test to DescribeWorkflow Signed-off-by: dbudris <dbudris@nvidia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dbudris <dbudris@nvidia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
867eb5aa78 |
build: bump github.com/russellhaering/gosaml2 from 0.11.0 to 0.12.0 in /controller (#2402)
* build: bump github.com/russellhaering/gosaml2 in /controller Bumps [github.com/russellhaering/gosaml2](https://github.com/russellhaering/gosaml2) from 0.11.0 to 0.12.0. - [Release notes](https://github.com/russellhaering/gosaml2/releases) - [Commits](https://github.com/russellhaering/gosaml2/compare/v0.11.0...v0.12.0) --- updated-dependencies: - dependency-name: github.com/russellhaering/gosaml2 dependency-version: 0.12.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * build: sync workspace and notices for gosaml2 0.12.0 Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Terry Howe <thowe@nvidia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Terry Howe <thowe@nvidia.com> |
||
|
|
be19c614c1 |
feat(controller): accept control-plane component extraArgs at cluster create (#2395)
* feat(controller): add control-plane component extraArgs to the create API Add apiServer, controllerManager and scheduler, each with an extraArgs map from flag name to value, to CreateClusterControlPlaneConfig and to the cluster's controlPlaneConfig. Store them in the control-plane configuration snapshot, which is JSONB, so no migration is needed. Refs #2386 Signed-off-by: Carl Danley <cdanley@nvidia.com> * feat(controller): validate and render control-plane extraArgs Reject an operator argument for a flag NVKE sets on that component, a flag name that isn't lowercase words joined by hyphens, a feature-gates value that doesn't parse, and a gate that contradicts NVKE's. The create handler runs the check before it writes anything. Render the arguments into each component's extraArgs in the kubeadm ClusterConfiguration at init, from the snapshot the init node is pinned to. feature-gates is merged with NVKE's gates and sorted. Control-plane nodes that join later read them from kubeadm-config. A test keeps the list of flags NVKE sets in step with the renderer and the kubeadm-config rewrites. Refs #2386 Signed-off-by: Carl Danley <cdanley@nvidia.com> * feat(controller): reject AllAlpha and AllBeta in operator feature-gates Each sets every gate of its stage, including gates a later Kubernetes version adds, so an upgrade would turn on features nobody chose. The design review agreed to reject them, through a per-version gate catalog that was later dropped. Keep that decision without it, and record it in the design doc and the API description. Refs #2386 Signed-off-by: Carl Danley <cdanley@nvidia.com> * docs(design): describe the flag-name rule for control-plane extraArgs The Validation section said only that each map is from a non-empty flag name to a string value. The controller also requires lowercase words joined by single hyphens, without the leading "--", because components turn "_" into "-" when they parse flags. Say so, and why. Refs #2386 Signed-off-by: Carl Danley <cdanley@nvidia.com> * chore: allowlist the kubeadm golden bootstrap token in gitleaks The new extraArgs golden files render the synthetic bootstrap token that validInitConfig sets, and generic-api-key flags "token: <value>". Allow that one literal under controller/internal/kubeadmconfig/testdata only, with condition AND, so a real credential in those files, or the same literal elsewhere, is still caught. Refs #2386 Signed-off-by: Carl Danley <cdanley@nvidia.com> --------- Signed-off-by: Carl Danley <cdanley@nvidia.com> |
||
|
|
405de08095 |
feat(controller)!: reject a node pool Kubernetes version newer than the control plane (#2324)
* feat(controller)!: reject a node pool Kubernetes version newer than the control plane Signed-off-by: Payal Patel <payapatel@nvidia.com> * fix(controller): block a node pool version change while a control-plane upgrade is pending Signed-off-by: Payal Patel <payapatel@nvidia.com> * fix(controller): raise ControlPlaneUpgrading when the control-plane version is stored Signed-off-by: Payal Patel <payapatel@nvidia.com> --------- Signed-off-by: Payal Patel <payapatel@nvidia.com> |
||
|
|
7077990998 |
fix(controller): point control-plane quorum-floor refusal at node recycling (#2344)
* fix(controller): point control-plane quorum-floor refusal at node recycling
The 400 from DELETE /nodes/{id} that refuses to drop a healthy control
plane below three joined nodes told operators to delete the cluster.
During an upgrade that is the wrong advice: the controller replaces
drifted control-plane nodes itself once enableCPNodeRecycling is on.
Say that instead, and match the OpenAPI example.
Closes #1402
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* test(controller): drop message-text test for quorum-floor refusal
Signed-off-by: Aaron Patten <apatten@nvidia.com>
---------
Signed-off-by: Aaron Patten <apatten@nvidia.com>
|
||
|
|
c8529fb630 |
build: upgrade the Go toolchain to 1.27.4 (#2284)
* build: upgrade the Go toolchain to 1.27.4 Signed-off-by: Ilya Kislenko <ikislenko@nvidia.com> * ci: pin internal-config tools outside Ubuntu mirrors Ubuntu mirror DNS repeatedly prevented the required scanner from running. Extract checksum-pinned ripgrep and current PCRE2 packages from an immutable Debian snapshot, with the library path scoped to the checker step. Preserve the existing scan and merge-gate policy. Signed-off-by: Ilya Kislenko <ikislenko@nvidia.com> * ci: restore the existing Ubuntu package setup Remove the unnecessary custom ripgrep action and Debian snapshot package pins. Restore the original apt installation and keep this pull request focused on the Go 1.27.4 upgrade. Signed-off-by: Ilya Kislenko <ikislenko@nvidia.com> --------- Signed-off-by: Ilya Kislenko <ikislenko@nvidia.com> |
||
|
|
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>
|
||
|
|
09b688a521 |
fix(controller): keep a node pool's maxSurge when a PATCH omits it (#2110)
UpdateNodePoolRequest.maxSurge declared default: 0. The OpenAPI request validator writes schema defaults into the request body, so a PATCH that did not send maxSurge reached the handler with maxSurge: 0 and reset the stored value. Remove the default from the update schema; omitted fields are left unchanged, as the PATCH semantics in openapi.yaml state. Signed-off-by: Payal Patel <payapatel@nvidia.com> |
||
|
|
1a6d5efbe0 |
feat(controller): rebalance the control plane onto more-preferred instance types (#2074)
* feat(controller): rebalance the control plane onto more-preferred instance types Teach the control-plane reconciler to migrate members onto more-preferred instance types at steady state. When a joined member runs on a less-preferred type, the step surges one capped, more-preferred replacement, then sheds the old node through the shared control-plane delete path (quorum floor applied) once the replacement joins. It drives both halves of the surge-then-shed itself, so it is independent of the automatic scale-down toggle. It is the lowest-priority control-plane step: it acts only at steady state when nothing else is in flight, and yields to upgrades and rollouts by abandoning an in-flight surge rather than blocking them. Abandon a surge and record a backoff only on a real capacity shortfall: when the provider never allocated an instance within the surge timeout. A surge that did allocate an instance found capacity and is an ordinary provisioning node, bounded by the node provisioning timeout (NODE_PROVISIONING_TIMEOUT, which does not yet recycle control-plane nodes), not by this step. The surge timeout is a dedicated constant, separate from the provisioning timeout, governing only the not-yet-allocated capacity-wait phase, and re-probing after a capacity abandonment is rate-limited to once per backoff interval so a cluster with no preferred capacity re-probes slowly instead of churning a surge every timeout. Surge completion never strands a surplus node: the marker clears only when a node was actually shed or the control plane is back at its desired count, with explicit handling for the no-victim (undo-surge) and quorum-floor-refused cases, and an in-flight unrelated delete never clears the marker. Teardown skips control-plane graceful shutdown for a node that never joined, so a failed surge tears down cleanly instead of looping against an agent that never existed; the etcd member removal still runs and is a no-op when the member is absent. Surface the surge on the node API as a new optional, control-plane-only condition controlPlanePreferredReplacement, True while the node is a preferred replacement and cleared to False once it becomes an ordinary member. The step is provider-neutral: it surges via the ControlPlaneScaleDownRanker seam and bounds the fallback via the ControlPlaneRebalanceCapper seam; a provider with no ordered preference implements neither and the step is a no-op for it. Covered by table tests. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): add control-plane instance-type rebalance spec Add a nico-vms e2e spec that drives one steady-state control-plane rebalance round: it puts a more-preferred instance type at the front of the NICo instanceTypePreference, then asserts the controller surges one more-preferred replacement, joins it, and sheds a less-preferred node through the serialized delete path, settling back at the desired count with a single node moved to the preferred type and the surge marker cleared. The spec ranks on the NICo instanceTypePreference, which only the nico-vms control-plane provider carries, so it skips on other backends. It is bounded to a single round by disabling rebalancing once the surge is in flight, which also exercises the resolve-when-disabled path. It carries the "rebalance" label, which is in no CI lane, so it runs only when selected explicitly. Signed-off-by: Meha Mehta <meham@nvidia.com> * fix(controller): skip rebalance below the fault-tolerant floor A control plane whose desiredCount is below MinFaultTolerantControlPlaneNodes can never shed the node a rebalance surge adds: the quorum floor refuses the shed, so the control plane would sit one node above desired forever. Return before surging when desiredCount is below the floor. Also correct the withRebalanceReplacement doc comment: clearRebalanceMarker clears the marker on join but keeps the node's capped snapshot; it does not re-pin to the cluster's current config. Signed-off-by: Meha Mehta <meham@nvidia.com> --------- Signed-off-by: Meha Mehta <meham@nvidia.com> |
||
|
|
b5105879a3 |
build: bump the go-dependencies group across 1 directory with 16 updates (#2081)
* build: bump the go-dependencies group across 1 directory with 16 updates --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.73.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.etcd.io/etcd/api/v3 dependency-version: 3.7.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: go.etcd.io/etcd/client/v3 dependency-version: 3.7.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: google.golang.org/grpc dependency-version: 1.85.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: oras.land/oras-go/v2 dependency-version: 2.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/go-jose/go-jose/v4 dependency-version: 4.1.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/cedar-policy/cedar-go dependency-version: 1.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/oapi-codegen/runtime dependency-version: 1.8.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.opentelemetry.io/proto/otlp dependency-version: 1.11.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/getkin/kin-openapi dependency-version: 0.152.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/dsx-ai-factory/cluster-api-provider-nico dependency-version: 0.1.0 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/oapi-codegen/nethttp-middleware dependency-version: 1.3.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.temporal.io/api dependency-version: 1.64.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: go.yaml.in/yaml/v4 dependency-version: 4.0.0-rc.7 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: cloud.google.com/go/storage dependency-version: 1.70.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: google.golang.org/api dependency-version: 0.307.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * test(controller): use ParseSignedCompact for the operator OIDC token go-jose v4.1.7 deprecates ParseSigned in favour of the serialization-specific entry points. The static key set verifies a JWT in compact serialization, so ParseSignedCompact is the direct replacement and clears staticcheck SA1019. Signed-off-by: Terry Howe <thowe@nvidia.com> * build: sync go.work.sum with the go-dependencies bump Signed-off-by: Terry Howe <thowe@nvidia.com> * docs: regenerate THIRD_PARTY_NOTICES for the go-dependencies bump Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Terry Howe <thowe@nvidia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Terry Howe <thowe@nvidia.com> |
||
|
|
1dc3b677aa |
feat(controller): auto scale down control plane on desired-count decrease (#1902)
* feat(controller): auto scale down the control plane on desired-count decrease Shed surplus control-plane nodes when a cluster's controlPlaneConfig.desiredCount is decreased. The reconciler records a delete as intent and the serialized delete path tears nodes down one at a time, never below the fault-tolerant quorum floor and never while a rollout is in progress -- including the window where a surge node exists but the recycling condition has not latched yet. Victim selection is provider-ranked: the least-preferred node is shed first via the ControlPlaneScaleDownRanker capability (Nico ranks by instance-type preference), then oldest, then lowest ID; a provider that expresses no preference falls back to age. A reflection-driven test guards the provider union so a new provider cannot silently lose its ranking. Automatic scale-down is on by default. An operator can set controlPlaneConfig.autoScaleDownDisabled to switch it off per cluster -- for example to guard against an accidental or automation-driven desiredCount decrease -- mirroring the node-pool autoProvisionDisabled opt-out. It is stored as a cluster column (cp_auto_scale_down_disabled) like cp_max_surge: operational, outside the append-only config snapshot, and not rollout-triggering. Signed-off-by: Meha Mehta <meham@nvidia.com> * fix(controller): count joined etcd members at the scale-down quorum floor The record-time floor (countSurvivingJoinedControlPlane) counts every joined control-plane node toward quorum regardless of health, but the scale-down pre-check counted only the healthy clean-joined subset via scaleDownEligible. A joined-but-unhealthy node is still an etcd member, so the two floors could disagree and the pre-check could hold at the floor in a case the authoritative delete path would allow. Count joined members in the removable set instead, mirroring the delete-path floor. The healthy-joined victim guard is kept, matching ensureControlPlaneQuorumFloor, which exempts a not-yet-joined or unhealthy victim so removing a dead member is never blocked. Signed-off-by: Meha Mehta <meham@nvidia.com> --------- Signed-off-by: Meha Mehta <meham@nvidia.com> |
||
|
|
9336f06eb4 |
feat(encryption): add recoverable owned etcd key rotation (#1376)
* feat(encryption): add recoverable owned etcd key rotation Redistribute reviewed rotation lifecycle, storage-name identity, membership convergence, acknowledged rewrite recovery, loaded-config restart proof and version-gated Begin acceptance from c39e7326. Reuse the renewal foundation admission fences and deterministic notices without duplicating their implementation. Adapt API descriptions and Kubernetes test dependency pins to current main; retain current-main VIP, nodepool replacement and machine-materialization admissions. Synchronize module manifests and regenerate protobuf, OpenAPI and notices artifacts through pinned Make targets. Closes #1344 Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(encryption): drop database lock release for lost rotation hosts The documented add_secondary lock release trusted the recorded rotation phase, but RecordEtcdKeyRotationPhase is not monotonic, so a reset can move the phase back while nodes already use the new key. Remove the database-edit exception and keep the lock until the owning workflow completes; a lost host is restored with the same identity or the cluster is restored from backup. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): finalize unnamed enablement key under the legacy name Enablement may reuse a pending key staged before names were recorded and admits node agents that predate the encryption identity RPC. Finalizing that key queried every joined control-plane agent and failed on them. Enablement distributes an unnamed pending key under the legacy name, so record that name without discovery. Rotation, including rotation histories recorded before ownership that finalize through the same activity after EtcdEncrypted is set, keeps discovering the deployed pending name. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): reject reused workflow ID of a succeeded etcd key rotation A new execution that reused the workflow ID of a succeeded rotation got AlreadyCompleted from Begin and returned success without rotating. Begin succeeds at most once per run, so a succeeded owner can only mean ID reuse; return the non-retryable rotation precondition error instead. A retry of an accepted Begin within the same run still finds a running owner and stays idempotent. The workflow keeps its AlreadyCompleted branch, unchanged, so recorded histories that carry it replay with their original commands. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(agent): state the actual UpdateEncryptionConfig error codes The contract said FailedPrecondition meant only a missing config and that other codes left no partial state. The agent also returns Canceled, Unavailable, and FailedPrecondition for a stale WAL entry, a config the apiserver has not loaded, and config or ownership changes, and it retains the WAL entry for a retry of the same operation. List the codes and drop the no-partial-state guarantee. Comment-only; *.pb.go regenerated. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(controller): note that a prepare failure releases the rotation lock EtcdKeyRotationStatus said every failed rotation retains UpdateInProgress. FailEtcdKeyRotation clears it for a prepare-phase failure; only failures after prepare retain it. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): give a failed encrypted-object rewrite a fixed remedy The rewrite activity clears ErrorMessage so agent errors that can echo rejected Secret bodies never reach workflow history, which left the workflow error as "encrypted-object rewrite failed: ". Return a fixed, secret-free message pointing at the node rewrite state instead. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): refuse etcd key rotation until control-plane nodes run the cluster's Kubernetes version PATCH records the desired Kubernetes version before the control-plane upgrade marks ControlPlaneUpgrading, so Begin could accept a rotation while every node still ran 1.33. add_secondary then failed for lack of the encryption-config reload metric and the retained lock blocked the upgrade. Begin now compares each control-plane node's pinned configuration version with the cluster version and refuses, before taking the lock, when any node differs or its version cannot be determined. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): complete legacy etcd key rotations on agents without key identity A rotation started by the previous controller (no workflow owner) keeps its node agents, because agent upgrades are refused while it holds the mutation lock. After the controller upgrade, every rotation-phase node call and its finalization required GetEtcdEncryptionKeyIdentity. Agents without that RPC therefore failed the run, and the legacy failure path released the lock while nodes could already write with the pending key. Restore the original protocol for that case. A pending key with no recorded name was staged by the earlier controller. Its node mutations skip the identity RPC and send the request unnamed, as before: the agent derives the name on add and matches the key by its bytes afterwards. Legacy finalization makes the key active without recording or guessing a name and drops the stale active name. The next init, join or rotation discovers the name. Named pending keys, and every owned rotation, still verify identity before each mutation. Enablement finalization still records the legacy bootstrap name. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): require agent success status for etcd rotation membership gate The node agent reports scripts it cannot start (for example EACCES) with status "error" and exit code 0. Require the "success" status so the membership gate never passes without a live check before old-key removal. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(controller): pass the required --reason to the etcd rotation reset example Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(controller): bound etcd rotation resets by Temporal history retention Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(agent): match UpdateEncryptionConfig error codes to the documented list A pre-write reload baseline that cannot read apiserver metrics now returns Unavailable; nothing was written, so a retry is safe. A failed WAL removal after confirmation returns Internal at once instead of being retried as a metrics outage and reported as Unavailable. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): tell callers to start a new etcd rotation after a prepare failure A prepare failure already released the rotation lock, so no reset of that workflow can succeed. Begin now directs the caller to start a new rotation with a new workflow ID instead of resetting the failed phase. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): retry retry-safe UpdateEncryptionConfig errors in key rotation Every rotation UpdateEncryptionConfig error became FailedNotRestored, and ApplyToNode returns outcomes rather than activity errors, so nothing retried a node mutation. A transient Unavailable or DeadlineExceeded, which the RPC contract calls safe to retry, failed the phase and kept the lock until an operator reset the workflow. Retry those two codes up to three times per node with a doubling backoff from 5s, stopping when the context ends. Each attempt can wait about two minutes for the reload, so the budget fits in the eight-minute ApplyToNode activity timeout. Every other code still fails at once. The guide now says what the automatic retry covers. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(controller): correct etcd key rotation recovery, backup and agent boundary Three guide corrections from review: - A terminated or timed-out owner never runs its failure cleanup, so state stays running and the lock stays held in any phase, prepare included. Begin refuses a new workflow ID then; recovery is resetting that same workflow ID. The prepare row and the recovery intro now say so. - Finalization replaces active and active-name and keeps no prior key, so operators must retain the current key Secret with their etcd backups before starting; the guide says to copy the Secret object into the backup store without printing its data. - agent/v0.3.0-rc.2 also lacks GetEtcdEncryptionKeyIdentity, so it is now the named boundary. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(agent): describe the current encryption rotation WAL protocol The encRotationWALFile and commitConfigWrite comments still described a reload-counter snapshot. The WAL now records only the operation id, and the write first checks that the apiserver's loaded-config identity matches the current on-disk config. Comments only. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): point a prepare-phase etcd rotation failure at a new workflow After a prepare failure the rotation lock is already released and Begin refuses a reset of that owner, yet updateFailed still told the operator to recover the owning workflow. For prepare it now says to fix the prerequisite and start a new rotation with a new workflow ID; later phases keep the recover-the-owner message. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * test(controller): require bash and jq before the rotation membership probe test The probe test ran host bash and jq with no precondition, and the probe discards stderr, so without jq the converged case failed with a bare exit status and the negative cases passed for the wrong reason. Skip when either tool is missing, as the certificate-renewal runbook harness does. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(controller): back up the old storage name when the key Secret lacks it The guide told operators to copy the key Secret before a rotation because its active and active-name fields hold the key and its storage name. A Secret from before storage names were recorded, or one last rotated by an earlier controller, has no active-name, so that copy cannot restore a pre-rotation snapshot whose ciphertext carries the old name. The workflow records the old key's storage name in active-name before it enters add_secondary and keeps the old key in active until finalize. Tell operators to copy the Secret again in that window when the first copy has no active-name. Also say that a node key update makes up to three attempts, which is what the code does, instead of "retries up to three times". Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(agent): say what defaultReloadPollInterval polls The interval is used to poll the apiserver encryption metrics, both the loaded-config identity during a key update and the reload counter during enablement, not only the reload counter. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): record the active key name when rotation reuses a pending key Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(api): point control-plane 409s at the etcd key rotation runbook Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(controller): name the NVKE controller in the etcd key rotation runbook Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): tolerate an old key already removed from some nodes when reusing a pending key Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(controller): say an old key removed from every node needs an earlier backup When rotation reuses a pending key and no control-plane node still has the old key, no node records its storage name either, so a node's encryption config cannot replace the backup. Also drop an unreachable error check: the pending-key lookup just above already returns those errors. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(agent): replace a stale encryption config when bootstrapping a reset node kubeadm reset removes the static pod manifests, PKI, kubeconfigs and the etcd data directory, but leaves /etc/kubernetes/kube-api-encryption behind. Init or join after a reset, or on a reused host, then failed the storage identity check with "renaming a storage key is unsafe" before kubeadm ran. kubeadm init and join now replace an existing config whose key identity conflicts when no local data can depend on it: /var/lib/etcd/member is absent or empty and /etc/kubernetes/manifests/kube-apiserver.yaml is absent. If either exists, the rename check still applies. The enable-encryption RPC keeps the check unconditionally. A replacement is logged with SHA-256 key digests only. The agent does not receive the etcd dataDir. It checks kubeadm's default /var/lib/etcd, which is also what the controller renders (kubeadmconfig defaultEtcdDataDir). Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(controller): preserve legacy pending-key staging on redelivery Legacy rotation histories may persist an unnamed pending key before losing the staging activity acknowledgement. Redelivery under the legacy etcd_encryption lock now reuses that key without the identity RPC, while owned rotations still prove pending-key identity. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(etcd-encryption): point PATCH conflicts at rotation recovery A failed etcd key rotation keeps the etcd_key_rotation lock, so the updateCluster description, its 409 response, the runtime 409 message and the troubleshooting entry now point to phase-aware recovery. The rotation guide names the Temporal namespace, task queue, address and TLS settings the way the certificate-renewal guide does. Addresses review threads r4335392969 and r4335393460. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * fix(etcd-encryption): guard host verifier test and document rotation lock retention Review fixes for PR #1376: - F3: skip TestEtcdKeyRotationVerifierRequiresExistingSecretRewriteAndConvergence when sha256sum is not on PATH, matching the runbook membership test, instead of failing with a misleading verifier error. - F5a: the troubleshoot 409 cause and step-1 list, the create.md Updating row and the observe.md checklist now name a failed etcd key rotation that retained updateInProgress (type=etcd_key_rotation, etcdKeyRotation.state=failed) and link to phase-aware recovery. Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> * docs(etcd-encryption): cover closed running rotation owners and bound their reset Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> --------- Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com> |
||
|
|
c04c118fc0 |
feat(controller): harden rolling certificate renewal and admission (#1375)
* build(agent): preserve deterministic notice attribution for renewal checks
Reuse the reviewed deterministic notices generator and regression fixtures from c39e7326. URL discovery must not change linked-module attribution or drop saved license and NOTICE texts. Regenerate the index for current-main dependencies without changing the dependency graph.
Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>
* feat(controller): harden certificate renewal and fence control-plane mutations
Rebase the reviewed renewal foundation from 6cb2c325 (#967) onto current main and retain rollout-adapter compatibility from 5621b713. Move the shared cluster-row admission safeguards from a1e46d20/c1643fca/cb63cb35 into this bottom layer, covering both acceptance orders and retained failed renewal ownership.
Keep current-main OIDC provider pinning, VIP replacement constraints, nodepool reconciliation, NICo behavior and whole-row condition locking. Rotation-specific lifecycle, RPCs and audit remain in later stack layers. Regenerate protobuf and OpenAPI output; conform new schemas to current lint conventions.
Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>
* fix(controller): retain provisioning intent during pre-join cleanup
Classify etcd removal and kubeadm reset from the locked node lifecycle after taking the cluster admission lock. Reserve Provisioning for an unjoined node without teardown intent, and retain Deleting for joined, requested or in-progress teardown. CAPI machine deletion remains unconditionally destructive, including before a first join. Keep existing Temporal commands and payload semantics unchanged.
Exercise real cleanup activities and persisted completion updates with stateful stores: fresh and retried cleanup, unknown RPC results, locked-state classification, both credential admission orders, successful renewal admission after completion, and the next serial control-plane join. Align the existing admission fixture with current main’s added controller reader parameter.
Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>
* fix(controller): leave queued deletion promotion to the reconciler
An accepted DeleteRequested on an unjoined node is not a started teardown. Keep the request and provisioning reservation during pre-join cleanup under the existing cluster-first/node-second locks; leave Deleting and its outbox entry paired in StartRequestedTeardown. Retain real teardown, CAPI deletion and uncertain-RPC fences without changing Temporal payloads or commands.
Exercise real request admission, cleanup and completion activities, then full controller reconciliation and teardown outbox contents with stable, queued and deleting siblings. Cover locked stale lifecycle state and queued versus started deletion on successful and uncertain RPCs. The final regression compiles and fails against the rebased helper before this fix and passes after it.
Adapt the inherited renewal failure log to golangci-lint 2.14.0 by checking the nullable UUID before logging its Stringer value. Full preflight on captured main
|
||
|
|
a3cabe2db2 |
refactor(auth): move the authN library to auth/authn (#1903)
Move controller/internal/auth to auth/authn as package authn, in a new module, github.com/dsx-ai-factory/nvke/auth. This is a pure move with no behavior change: only the package name, import paths, the qualifier and path references change. The new module is wired the way controller/api is: go.work use, a require and replace in controller/go.mod, a replace to ../controller/api in auth/go.mod, the root Makefile module lists, the lint and unit-test CI matrices, the e2e path filters, the coverage registry, the notices and licence ignore lists, CODEOWNERS and the labeler. Signed-off-by: dbudris <dbudris@nvidia.com> |
||
|
|
229df84386 |
feat(controller): allow dev control planes without a VIP (#1893)
* feat(controller): allow dev control planes without a VIP Closes #1892 Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> * docs: clarify no-VIP development guidance Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> * docs: document accepted no-VIP rollout behavior Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> * test(e2e): fit CAPD control planes to local memory Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> --------- Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> |
||
|
|
32c6d96c7b |
feat(controller): add an API to point a cluster's nodes at a SPIRE server (#1802)
PATCH /clusters/{clusterID}/spire-server validates the address and port,
stores them in the new clusters.spire_server column, takes the
spire_server_update UpdateInProgress lock and enqueues the
UpdateSpireServer workflow through the workflow outbox, in one
transaction. Repeating the request for the same server while it runs
returns 202 without enqueuing again; any other running operation, or an
update to a different server, returns 409.
The workflow calls the node agent's ReconfigureSpireAgent on every
SPIFFE-enabled node in parallel, then releases the lock and records the
failed nodes in UpdateFailed.
GET /clusters/{clusterID}/spire-server returns the requested server and
each node's SPIRE agent status, read live from the node agents with
bounded concurrency and a per-node timeout. The API server now receives
the node agent client for this.
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
|
||
|
|
6aa5166b3c |
feat(launchlayer): support external security group IDs (#1831)
Signed-off-by: Giuseppe Laguteta <glaguteta@nvidia.com> |
||
|
|
b38665858a |
build: bump Go to 1.27.3 (#1821)
Go 1.27.3 fixes CVE-2026-111943 (golang/go#82345). crypto/x509 stops trusting a small set of intermediate CA certificates, and Certificate.Verify drops chains that contain them. Every shipped binary verifies TLS chains through crypto/x509. go.work names 1.27.3 and make go-version-sync carries it to each member go.mod. The golang base images move to 1.27.3 with their new index digests. Signed-off-by: dbudris <dbudris@nvidia.com> |
||
|
|
641efe80b8 |
build: bump the go-dependencies group across 1 directory with 8 updates (#1817)
* build: bump the go-dependencies group across 1 directory with 8 updates --- updated-dependencies: - dependency-name: oras.land/oras-go/v2 dependency-version: 2.6.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/go-jose/go-jose/v4 dependency-version: 4.1.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2 dependency-version: 2.32.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/getkin/kin-openapi dependency-version: 0.151.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/prometheus/common dependency-version: 0.72.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: go.temporal.io/api dependency-version: 1.64.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.temporal.io/sdk dependency-version: 1.50.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: google.golang.org/api dependency-version: 0.304.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * build: refresh go.work.sum and the third-party notices for the bump `make work-sync` and the root `make notices`, which Dependabot does not run; the gate's workspace and notices checks read both. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * build(management-engine): regenerate the public API contract for the bump grpc-gateway 2.32 writes `additionalProperties: true` where 2.30 wrote `{}`; `make generate-public-api` output, which check-public-api compares. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * test(controller): assert the read-only rejection's reason, not its wording kin-openapi 0.151 reports the violation through its schema error, prefixed with the schema and the field; the 400 and the reason are unchanged. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Davanum Srinivas <dsrinivas@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> |
||
|
|
7845898d0e |
feat(controller): apply node pool labels and taints to nodes (#1672)
* feat(controller): add ApplyNodeMetadata activity for node pool labels and taints Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * feat(controller): apply node pool labels and taints during node join Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * feat(controller): backfill config-profile labels into stored node labels Add a one-time migration that copies each referenced config profile's labels into node_pools.node_labels and control-plane configurations' node_labels, reading profiles from the controller's mounted profiles directory. migrations.Migrate now takes the profiles directory, and the worker passes cfg.ProfilesDir Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * feat(controller): stop applying labels from config profiles Config-profile labels are now stored on node pools and control-plane configurations and applied by ApplyNodeMetadata. Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * chore(controller): drop config profile labels from profile parsing and docs Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * docs: describe how node labels and taints are applied Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * test(e2e): check node pool and control-plane labels and taints on tenant nodes Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * chore(api): regenerate server code after rebase Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * fix(controller): fail the label backfill until config profiles are mounted Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * chore(controller): remove metadata validation in workflow same validation exists at API boundary. For workflow, rely on the Kubernetes API to reject invalid node labels and taints. Add notes about migrations dependecny on cfg field Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * docs(api): reword the configProfile description Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> --------- Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> |
||
|
|
17f1f606e0 |
feat(controller): support create-only Machine metadata (#1708)
- Add Machine labels and annotations to node pools and control-plane configuration - Persist metadata and apply it when creating Machines - Validate reserved domains with separate configurable allowlists - Add tests and documentation; validate lifecycle behavior on Tilt with mock NICo Signed-off-by: Vivin Wilson <vwilson@nvidia.com> |
||
|
|
5e7267a6f5 |
feat(os-image): build OVN from dsx-ai-factory/ovn-kubernetes v2.4.2 with pod hostPort (#1694)
* feat(os-image): pin OVN to the fork's v2.4.2 and enable pod hostPort
The stream is now the fork's release tag and the lock pins its commit. values-nke.yaml sets global.enablePodHostPort; the agent clears it on container nodes, which run the local gateway.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
* chore(qualify): qualify the 2.4 OVN stream
The node image carries the fork's 2.4.2 packages after #1694, so the plan takes the highest 2.4 the apt suites serve.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
(cherry picked from commit
|
||
|
|
9f163d42e3 |
feat(os-image): build the OVN debs from dsx-ai-factory/ovn-kubernetes (#1560)
Build the nvke-cni-ovn charts and images packages from the NVIDIA fork at a commit the lock pins (release-1.6.0) instead of pulling upstream artifacts, and make 1.6.0 the default stream. - bundle.sh fetches the fork tarball with OVN_KUBERNETES_TOKEN (or GITHUB_TOKEN), verifies it against the lock, writes values-nke.yaml and builds localhost/nvke/ovnkube:<commit12> with docker buildx, nerdctl or podman. The lock pins source and tarball sha256; amd64 and arm64 must pin the same commit. Base images are pinned by digest and the built archive is cached in DIST_DIR. - The fork's Dockerfile.ubuntu is patched in a copy for three gaps its chart hits: the node liveness and readiness scripts are not copied (kubelet killed ovnkube-controller every two minutes), firewalld is missing, and the iptables wrappers chroot /host, which the chart never mounts. - nvke-agent uses global.imageRepositoryPrefix and global.gatewayOptions, runs OVN in local gateway mode on container nodes (--allow-no-uplink needs it and the chart hard-codes shared), and skips value files the chart no longer ships. - Default stream 1.4.0 -> 1.6.0 across the agent, controller, OpenAPI, protos, docs and e2e scripts; the DB migration keeps 1.4.0 for existing rows. The nico-vms release fixtures and create-forge-nico-cluster.sh install 1.6.0. - CI passes OVN_KUBERNETES_RO_TOKEN to the jobs that build cni-ovn. The nico-vms diagnostics capture ovnkube container logs and the tenant report. Signed-off-by: Noah Kontur <nkontur@nvidia.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
814a635320 |
docs(api): hide configProfile from public API documentation (#1660)
- Hide all six configProfile properties using Fern annotations - Prefix existing field descriptions with Deprecated: - Remove public examples and prose while preserving API compatibility Signed-off-by: Vivin Wilson <vwilson@nvidia.com> |
||
|
|
0c36a83334 |
build(deps): move nico-sim and the e2e module off the archived ncx-infra-controller-rest SDK (#1657)
Both modules now use github.com/NVIDIA/infra-controller/rest-api/sdk/standard and absorb its API drift. make work-sync bumped regexp2. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
fadaa3483e |
feat(controller): validate node pool labels and taints, with a configurable label allowlist (#1615)
* chore: validate node labels and taints Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * feat(controller): make the node label allowlist configurable Labels under kubernetes.io and k8s.io are rejected unless listed in nodeMetadataAllowlistedLabelKeys in nke-controller-config (chart value nodeMetadata.allowlistedLabelKeys, empty by default). Internal nke/nvke domains and the control-plane role key are always reserved, and the controller fails to start if the allowlist names them. Rejection errors name the reserved domain the key falls under. Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * docs(controller): clarify node label allowlist Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * fix(controller): align reserved node metadata domains and pass name-check Reserve nvke.nvidia.com, nke.nvidia.com and nke.io, dropping nvke.io. The OpenAPI descriptions now list all three and mark the nke domains as legacy. Allowlist the bare nke.io token in name-check: the controller names it only to reserve it. Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> * fix(controller): address review on node metadata validation Report the first invalid node label in sorted key order so repeated requests name the same key. Document the allowlist exclusions and startup validation in the chart values and README, and state why control-plane pools reject taints. Regenerate the embedded OpenAPI spec in server.gen.go, which was stale after the rebase, and fix a label test that the new Calico gate rejected first. Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> --------- Signed-off-by: pbikki-nv <50849668+pbikki@users.noreply.github.com> |
||
|
|
f520e100aa |
feat(controller)!: converge control-plane node-agent versions (#1353)
* refactor(agent)!: use version and method for agent updates Signed-off-by: Chao Chen <chaoch@nvidia.com> * feat(controller): converge control-plane node-agent versions Signed-off-by: Chao Chen <chaoch@nvidia.com> * test: cover agent convergence and deletion recovery Signed-off-by: Chao Chen <chaoch@nvidia.com> * docs: explain control-plane node-agent updates Signed-off-by: Chao Chen <chaoch@nvidia.com> |
||
|
|
3038cf917c | feat(controller): gate new Calico clusters (#1599) | ||
|
|
cacd6476f8 |
feat(nkx-17929): hide x-fern-ignore fields in Swagger UI
Swagger UI showed the full API specification, including Teleport and other fields that the public docs leave out. It now shows a filtered copy. The server still validates requests against the full specification. When a field is removed, it is also removed from the required list, so the public schema can still be satisfied. Signed-off-by: Alex Greene <algreene@nvidia.com> |
||
|
|
491d34fd8e |
build: bump the go-dependencies group across 1 directory with 2 updates (#1558)
* build: bump the go-dependencies group across 1 directory with 2 updates Bumps the go-dependencies group with 2 updates in the / directory: [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) and [golang.org/x/crypto](https://github.com/golang/crypto). Updates `github.com/prometheus/client_golang` from 1.24.1 to 1.25.0 - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.25.0/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.24.1...v1.25.0) Updates `golang.org/x/crypto` from 0.57.0 to 0.58.0 - [Commits](https://github.com/golang/crypto/compare/v0.57.0...v0.58.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-version: 1.25.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/crypto dependency-version: 0.58.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * build: regenerate workspace and notices for this bump --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
6e2892dd67 |
chore(api): drop the expired servers waiver (#1499)
The baseline moved past the placeholder-server change (controller/api/v0.0.34 and later), so the waiver matches nothing. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
3baba6d1b4 |
ci: give the name check its launch allowlist, and move the stragglers to the new name (#1484)
* chore: move test doubles, examples and stale references to the new name What the name check still reported outside the Tier 2 identifiers: synthetic names in tests (nke-site, nke-old, nke-injected, nke-role, nke-key-1 and friends), registry and path examples in documents and flag help (registry.example.com/nke, ghcr.io/my-org/nke, ~/dev/nke), development defaults (DEV_NAME, kind contexts, the promtail job, the mutagen example), stale references to packages renamed earlier (internal/nke, nke.NewClient, nkecli, nkeutils), the `nke#1399` issue shorthand, the CI image tag nke/capd-reboot-controller, the prune script's package names, and a few comments and messages. The UpdateNKERBAC rpc's errors now start with the rpc name, which no caller parses. Kept: the two synthetic fixture profiles' image URLs, because osprofiles-to-crs refuses to change a published MachineImage spec; the salt of the bring-up VMs' default password hash; the legacy installer path the kubeadm-distro test asserts is absent; the fleet names existing sites carry. The postgresql chart's description changes with a patch bump. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * ci: give the name check its launch allowlist hack/name-check-allowlist.txt grows from two entries to 48, each with its reason: the Tier 2 identifiers that stay until the post-launch release (PR4 Kubernetes, PR5 node, PR6 OS image and packages), the permanent keeps (migration names and texts, the NKEAuth magic and its package, fleet release and profile names, the identity of existing sites), the settings-coupled names (the old NGC token secret, the CODEOWNERS team slugs, the S3 and apt names, the old CLI name), and the files that keep the bare word (the agent version line the updater parses, the OIDC upstream CA subject, the Keycloak lab, the two NVCR workflows whose NGC organisation is named NKE). With it, NAME_CHECK_MODE=fail make name-check passes on this tree: 5,908 hits, all allowed, every entry in use. The make target keeps report mode until the launch flips it (W4). Closes #1483 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
17a88127b8 |
docs: say NVKE and nvkectl where the documents still said NKE and nkectl (#1462)
The mechanical half of the documentation change. The word NKE becomes NVKE in prose across the Markdown documents, the docs navigation, the Fern header text, NOTICE, the chart description and the OpenAPI description text; nkectl becomes nvkectl wherever a document names the CLI; a lowercase nke that is the product name becomes NVKE, the clone directory in cd lines becomes nvke, and an identifier in a code span, such as the dashboards' tag, becomes nvke. Identifiers stay: NKE_* and NKECluster-style names, every nke-*, nke.*, nke: and /.../nke persisted name, the "NKE Agent Version" output line, the Keycloak realm and tenant names in examples, and the Fern instance URL and /nke paths until the Fern instance is renamed. The embedded OpenAPI spec is regenerated with the pinned toolchain. The placeholder server URL in the spec counts as a removed object for the compatibility gate, so the waiver file records that decision. Not here: the editorial pass (first-use "NVIDIA Kubernetes Engine (NVKE)", the glossary, the release-note paragraph listing the persisted identifiers), which belongs with the new documentation set in #1391; CHANGELOG.md, which is generated; the CLI's own documents, written with intent in #1456; release/README.md and the issue templates, from #1460. Closes #1461 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> |
||
|
|
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> |
||
|
|
7b1c662d56 |
test(oidc): add an in-process HTTPS issuer (#1414)
Signed-off-by: Steven Zhang <stevenzhang@nvidia.com> |
||
|
|
48f5cab857 |
chore(controller): say controller, not CWE, in comments and log text (#1393)
Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
3d992713e5 |
feat(api): expire api-compat waivers written against an older baseline (#1374)
* feat(api): expire api-compat waivers written against an older baseline A waiver that matches nothing failed the gate outright, so once a tag carrying the accepted break was published, every branch that rebased past it failed on an entry that was spent rather than wrong. Waivers may now record the baseline they were written against (the failure stub fills it in). An unmatched waiver naming a different baseline than the current one is reported as expired and does not fail. A waiver with no baseline, or one that matches nothing against the baseline it names, still fails. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix(api): expire a waiver only when the baseline is a later release Inequality alone also covered checking against an older release, which is a supported mode (--baseline, API_COMPAT_BASELINE), and covered naming today's release some other way -- a SHA, refs/tags/..., a branch. Either would have expired the waivers written for the current tag, stopping the matches-nothing rule from applying in the run a reviewer reaches for. Order the two as release tags instead, and treat a pair that cannot be ordered as no supersession at all, so the waiver stays Unused and still fails. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix(api): select only stable release tags as the compat baseline git matches the tag glob with fnmatch, so controller/api/v0.0.29-rc1 matched and --sort=-version:refname ranked it above the release it precedes. A prerelease baseline cannot be ordered by supersedes, so a waiver written against an earlier release stayed Unused and failed instead of expiring. Pick the highest baseline through releaseVersion instead, the same function supersedes uses, and qualify the README on which baselines expire a waiver. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
ffb77c5007 |
build: bump golang.org/x/net to v0.60.0 (#1361)
* build: bump golang.org/x/net to v0.60.0 govulncheck reports GO-2026-6603, GO-2026-6610, GO-2026-6611, GO-2026-6612 and GO-2026-6617 in v0.59.0, so the merge gate fails until it moves. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * build: regenerate third-party notices for x/net v0.60.0 Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(api): remove the waivers that controller/api/v0.0.27 made stale PR #1306 landed with 14 waivers and the tag workflow then cut controller/api/v0.0.27 from that merge, so they match nothing and api-compat-check fails on every pull request. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> (cherry picked from commit 4e0e4f799cb4702e615be9875e8cb7fb6911f519) --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
97c6dee071 |
feat(controller)!: add node labels and taints to the API schema (#1306)
Support adding nodelabels and taints in API. This change covers the OpenAPI schema, the generated API types, the database schema and migration, and the create and read handlers that store and return the values. Stored labels and taints are not applied to Kubernetes nodes, which matches current behavior. A follow-up MR will apply them. Shipping the schema now lets API consumers, including nkectl, adopt the new fields. BREAKING CHANGE: - nodeLabels changes from a list of key=value strings to an object of keys and values on control-plane and node-pool create and read. - nodeLabels is removed from PATCH UpdateClusterControlPlaneConfig rejects unknown fields, so a patch that still sends controlPlaneConfig.nodeLabels returns 400. The same applies to a node-pool patch that sends nodeLabels or nodeTaints. |