Commit Graph
89 Commits
Author SHA1 Message Date
Davanum Srinivas 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>
2026-11-30 20:27:49 -05:00
Abhinav Pandey 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>
2026-11-30 15:32:32 -08:00
Jyoti Mahapatra 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>
2026-11-30 20:32:02 +00:00
Meha Mehta 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>
2026-11-25 11:35:55 -05:00
Anisha Gupta US 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>
2026-11-23 14:39:40 -05:00
Dan Budrisanddependabot[bot] 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>
2026-11-23 07:29:38 -07:00
dependabot[bot]andTerry Howe 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>
2026-11-19 14:27:48 -07:00
Carl Danley 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>
2026-11-19 10:33:40 -05:00
patelpayal 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>
2026-11-16 13:35:08 -08:00
Aaron Patten 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>
2026-11-16 11:34:45 -05:00
Ilya Kislenko 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>
2026-11-12 08:42:23 -08:00
Aaron Patten 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>
2026-11-10 10:21:46 -07:00
patelpayal 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>
2026-11-04 12:11:57 -08:00
Meha Mehta 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>
2026-11-03 19:44:59 +00:00
dependabot[bot]andTerry Howe 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>
2026-11-03 10:51:38 -07:00
Meha Mehta 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>
2026-10-28 10:22:35 -04:00
Tjark Rasche 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>
2026-10-26 09:52:24 -07:00
Tjark Rasche 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 7ce1352d and required module, generation, API v0.0.28, race, notices, docs, workspace, license and build checks pass.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): accept a missing super-admin.conf on joined control-plane nodes

kubeadm v1.34 lists super-admin.conf in certs check-expiration and reports it
as missing on every node that joined the control plane, because kubeadm join
never writes it. Both expiry parsers treated that row as fatal, so CHECK_ONLY
failed and every non-forced cycle on a multi-node control plane failed hourly.

Skip only the exact `!MISSING! super-admin.conf` row in the runbook and the
agent parser; any other missing certificate still fails closed. Add parser
cases for fresh and due joined nodes, runbook cases for renewal and check-only
selection, and a non-forced cycle on the three-node e2e control plane before
the forced one.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): finish pending legacy-runbook restarts on the legacy executor

CHECK_ONLY reported RENEWAL_REQUIRED=true for the runbook's own renewing or
restart_pending phase, and the workflow then dispatched the typed V2 RPC. The
agent never reads the runbook phase file, so a fresh non-forced cycle returned
unchanged and advanced nextCertRenewalDue while components after the failed
restart kept their old in-memory certificates.

Report runbook intent as RENEWAL_REQUIRED=legacy. The check activity now
returns whether renewal is required and whether the legacy executor must
resume it, and the workflow sends that node straight to the legacy runbook,
which completes the remaining restarts before clearing its phase. Agent-side
intent still goes to the typed executor. Cover runbook check-only output, the
activity result and a workflow cycle with runbook restart_pending intent on a
V2-capable agent.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): retry transient status errors while resolving a node renewal

Resolution returned on the first GetKubernetesCertificateRenewalStatus error,
and the workflow runs it once, so an agent restart or network blip right after
a node failure retained the cluster mutation lock even when the agent reported
a terminal status seconds later.

Within the five-minute cleanup budget, keep polling through transport errors
without a gRPC status and Unavailable or DeadlineExceeded responses. NotFound,
Unimplemented and other agent answers stay conclusive, and the lock is retained
only when no matching terminal status arrives by the deadline. Test one failed
status call followed by a terminal failure, and a persistent error.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(agent): report failing notices generator assertions

Give each bare grep -q assertion in test-generate-notices.sh an explicit ERROR message so a regression does not fail the gate silently under set -e.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): note retained renewal lock in 409 responses

The control-plane mutation 409 message and the deleteNodePool/deleteNode descriptions told clients to retry after the operation completes. A failed certificate renewal can retain the lock until an operator clears it; say so and point to the recovery procedure in controller/docs/certificate-renewal.md.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): note refused renewal cycles record startedAt without the lock

Refused certificate renewal cycles (admission, two-control-plane-voters) set startedAt but never take the cluster mutation lock. Clarify the CertificateRenewalStatus.startedAt description and regenerate the API code.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): refuse certificate renewal while a node reservation is held

Begin now records an admission refusal while cluster.CertificateRenewal is set. Resolve releases the matching reservation after confirmed terminal evidence, and the reconciler clears a fenced (V2) reservation the agent reports as NotFound or Unimplemented once no cert_renewal lock is held.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): direct two-node control planes to scale to three for renewal

A healthy two-node control plane cannot scale down to one: the controller only scales up and refuses deleting a healthy node below three survivors. Point the refusal message and guide at three or more nodes.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): clarify cert renewal retry waits for due time

A failed renewal does not move nextCertRenewalDue, and the controller checks the due time before the one-hour failure backoff. Document that automatic retries run only after both have passed.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): finish pending cert-renewal restarts of both executors in one cycle

When both the legacy runbook phase file and the agent's k8sCertRenewalState hold renewing/restart_pending intent, the check-only mode now reports legacy_then_typed. The workflow then runs the legacy executor and, behind the same kube-vip drain, the typed executor, so the agent's pending restart no longer waits a full renewal interval.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(controller): cover legacy cert-renewal intent on single node and on failure

Run the pending legacy-intent test against one and three control-plane nodes (two is refused by production Begin) so the single-node no-drain path is covered, and add a failure case asserting cleanup resolves the legacy operation.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): decode legacy bool cert-renewal check results on replay

Earlier heads of this change returned a bare bool from CheckKubernetesCertificateRenewalRequired. Accept that recorded payload when decoding the struct result so in-flight RenewK8sCertsV2 histories still replay; true maps to Required.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): note retained renewal lock in cluster update 409

A failed certificate renewal can keep the cluster mutation lock after the cycle ends. The PATCH /clusters/{clusterID} description, its 409 response and the certificate_renewal conflict message now say so and point to the retained-lock recovery procedure, matching the delete endpoints.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): document the node reservation blocking cert renewal retry

Admission refuses renewal while clusters.certificate_renewal is set. List that refusal and tell operators to check the column before expecting a retry after clearing a retained lock.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): keep two-voter renewal halt while desired count is below three

A two-node control plane cannot scale down to one, so desiredCount 1 must not restart the hourly two-voter refusal loop. Halt while desiredCount < 3 and flip the scaled-to-one test case.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(controller): assert unchanged outcome after non-forced e2e cert renewal

The non-forced e2e step only checked that static-pod containers kept their IDs. Read the cluster's certificateRenewal condition and require this cycle to have succeeded with outcome unchanged, so a cycle that renews without restarting pods fails.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(controller): cover cert renewal table with only missing super-admin.conf

A kubeadm expiration table whose only leaf row is the tolerated '!MISSING! super-admin.conf' has no certificate to judge; assert the runbook fails closed in renewal and check-only modes. Also cover tabwriter trailing padding on a leaf row. The script already handles both (seen == 0 exits 2); no script change.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(controller): make persistent cert renewal status retry case deterministic

Cancel the resolve context from the status hook instead of relying on a 50ms deadline, so the case no longer depends on the first status call finishing before the deadline under load.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(controller): cover cert renewal reservation replaced under the row lock

Add cases where the locked cluster row holds a different renewal reservation (another operation or node) than the status-RPC snapshot, and assert clearAbsentCertificateRenewal keeps it.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): keep resolving cert renewal when release fails after termination

Once terminal status confirms the operation ended, a failed reservation release is logged instead of failing Resolve, so the workflow no longer retains the cluster mutation lock; the reconciler clears the reservation. Status polling also stops with time left so the release does not run on an expired context.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): keep V1 cert renewal from adopting a fenced reservation

A V1 RenewK8sCerts history never takes the cert_renewal lock, so reattaching to a fenced V2 reservation on its node let the reconciler clear that reservation while V1 work ran. V1 now treats a fenced same-node reservation as busy and waits.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): refuse certificate renewal only for fenced reservations

A leftover unfenced V1 reservation is never cleared by the reconciler when the agent lacks the typed RPC, so refusing on it blocked every later cycle. Begin now refuses only fenced reservations; dispatch reattaches an unfenced one on the same node and refuses as not-dispatched on another node, as before.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): limit the reservation refusal to fenced reservations

Admission refuses only fenced (current-workflow) reservations; a leftover V1 reservation is reattached by the next cycle on the same node.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): admit direct legacy cert renewal like typed renewal

A node whose expiry check selected the legacy runbook was dispatched without the reservation checks, so the runbook could restart static pods on a node marked for repair, recycling or deletion, or in a deleting cluster. V2 legacy dispatch now reserves the node first, reports a refusal as CertificateRenewalNotDispatched so the cycle releases its lock without resolution, and releases the reservation once the receipt confirms termination.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): release the V1 renewal reservation after a failed Start

V1 histories never run Resolve and the reconciler keeps unfenced reservations, so a failed V1 Start kept clusters.certificate_renewal set and blocked node-agent upgrades. Release it as main did; V2 keeps the reservation for Resolve.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): let status-only cert renewal abandon on a fresh node

Status-only resolution opened the lock read-only, so on a node where the runbook never ran it failed before recording the abandoned receipt, leaving the certificate_renewal lock held. Create STATE_DIR (0700) and open the lock for append without truncating, and cover the no-state-directory case.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs: note two-node control planes are excluded from cert renewal

State in the desiredCount row and the tenant admin.conf description that a cluster with exactly two control-plane nodes is not renewed automatically, matching the two-control-plane-voters refusal.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): refuse V2 cert renewal on a node with a V1 reservation

Since admission stopped refusing unfenced reservations, a V2 cycle that
reached the node holding a V1 workflow's reservation reattached to it and
ran under the V1 operation ID. Workflow cleanup still polled the cycle's
own operation ID, got NotFound and kept the cluster mutation lock, and the
cycle could record the V1 outcome without renewing anything.

A V2 request now never adopts an unfenced reservation. It is refused like
a reservation on another node, so the first attempt reports
CertificateRenewalNotDispatched and the cycle releases its lock. V2 still
reattaches to its own fenced reservation on retry, and V1 still reattaches
to an unfenced one.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): release the V1 cert renewal reservation on every failed dispatch

V1 workflows never run Resolve, and the reconciler clears an unfenced
reservation only once the agent reports that operation terminal. Two V1
failures still kept the reservation, which then blocked node-agent
upgrades with nothing to clear it: the inline legacy fallback failing with
anything other than a RunbookError (for example a transport error), and a
Start that returned no operation.

Release on both, as main does, through the same releaseAfterFailedStart
helper main uses; release failures are joined into the returned error.
This deliberately accepts that a legacy script may still be running after
a transport error, which main already accepts on the V1 path. Status-poll
errors after the agent accepted typed work still keep the reservation, as
on main, because that work may still be running and the reconciler clears
it on terminal status. V2 behavior is unchanged.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): say a V2 cycle refuses a node with a V1 reservation

The guide and the admission comment still said the next cycle reattaches
to a reservation left by a V1 workflow. A V2 cycle now refuses that node
without dispatch, fails and retries after the backoff, and the V1 activity
releases its own reservation when it ends unless the agent accepted the
work and stopped answering, in which case the reconciler clears it once
the agent reports it terminal.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): version the typed dispatch after a legacy cert renewal

Finishing pending restarts of both executors in one cycle added a typed
RenewKubernetesCertificates dispatch after a successful legacy run when
the check reports legacy_then_typed. The check can return that only since
the same change, but a cycle started on an old worker can still be
mid-flight during a deploy, and its history has no such activity, so a
new worker could not replay it.

Guard the second dispatch with a new GetVersion change ID,
certificate-renewal-typed-after-legacy. At DefaultVersion the node keeps
the legacy result, as before. GetVersion runs only on the path that would
dispatch, so histories that never reach it are unaffected.

The repository has no recorded-history replayer test, so the workflow
test stands in for replay: it pins OnGetVersion to DefaultVersion and
asserts no typed dispatch, and to version 1 and asserts the typed run and
the outcome merge.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): let malformed agent state not block a pending legacy resume

The check-only mode of the renewal runbook parsed the node-agent
state.json, and died on a parse error or an unknown state, before it
looked at its own persisted phase. A node whose runbook was left in
renewing or restart_pending then failed every expiry check, so the legacy
executor, the only one that can finish those restarts, was never
dispatched.

When the runbook has pending intent, an unreadable or unknown agent state
is now logged to stderr and the check reports RENEWAL_REQUIRED=legacy;
stdout stays exactly the marker line. Without pending runbook intent the
check still fails closed, as before.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): retry the cert renewal release after a successful legacy run

After a legacy run succeeded, a single failed releaseCertificateRenewal
left the node reservation set. On V2 the activity logs it and returns the
result, but the cycle's next node is then refused as busy and the cycle
fails until the one-hour backoff passes; on V1 the activity fails.

Retry the release up to three times, waiting 1s and then 2s, and stop
early when the context ends. The retry lives in one helper used by both
legacy success paths. After the last attempt the existing behavior stays:
V2 logs a warning and returns the result, V1 returns the error. The
backoff is a package variable so the tests run fast.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): satisfy lint in cert renewal release retry and replay test

The release retry kept its backoff in a package variable, which
gochecknoglobals rejects, and the version-marker test helper did not call
t.Helper(). Move the attempt count and initial backoff into the existing
constant block (three attempts, 1s doubling to 2s) and mark the helper.
The retry test now waits the real backoff, a few seconds in total.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): refuse a V1 reservation on V2 retries too

A V2 cert renewal that found an unfenced V1 reservation on its node
returned CertificateRenewalNotDispatched only on the first attempt. If
attempt 1 failed before reserving, for example on a transient database
error, and a V1 workflow reserved the node in between, later attempts
returned a plain retryable error. The cycle then treated the node as
pending, Resolve on its own operation ID got NotFound, and the cluster
mutation lock stayed held.

V2 writes only fenced reservations, and the reconciler clears a fenced
one only after the lock is released. An unfenced record on the node
therefore means this cycle holds no reservation there, so refusing it
as not dispatched is safe on every attempt.

The activity test environment always runs attempt 1, so the new retry
rows run the activity in a workflow test environment with a retry policy
and fail the first reservation transaction.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): say when a V1 cert renewal reservation needs a manual clear

The guide said any leftover V1 reservation is cleared automatically once
its node operation has ended. That is not true. An interrupted V1 activity,
a failed release or an agent without the typed status RPC can leave an
unfenced reservation, and the reconciler clears an unfenced record only
when the agent reports the operation finished or the node row is gone.
NotFound and Unimplemented leave it in place.

Describe those cases and the operator procedure: confirm that the runbook
has stopped on the node, then clear the column under the cluster row lock
after checking that it still holds the same node and operation ID.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(controller): skip the real release backoff in the retry test

TestLegacyRenewalSuccessRetriesRelease waited the real 1 s and 2 s
release backoff in every case, about 8 s per run and more under
-count. The backoff is a const to keep gochecknoglobals clean, so an
unexported field on Activities now overrides the first wait when
non-zero, and the test sets it to a millisecond. Production code leaves
it zero and keeps the const.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs: explain Updating status for a failed certificate renewal that kept the lock

A failed certificate renewal whose node work was not confirmed terminal
keeps updateInProgress=certificate_renewal, which nvkectl shows as
Updating. Say so in both STATUS descriptions and link the recovery steps.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs: say an existing two-node control plane must scale to three

The controller only adds control-plane nodes and refuses to delete below
three, so a two-node cluster cannot move to one. Certificate renewal
resumes only once desiredCount is three or more.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): name the NVKE controller and its ConfigMap in the renewal guide

Replace the old CWE name with the NVKE controller and refer to the chart's
default ConfigMap, nvke-controller-config.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs: name the retained renewal lock field as the API exposes it

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): preserve renewal executor ownership across retries

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): use embedded legacy renewal runbook for V2 dispatch

V2 legacy fallback relies on the embedded runbook lock and operation receipts to prove termination before releasing ownership. Configured overrides cannot be assumed to participate in that protocol, so V2 now dispatches only the embedded runbook while V1 keeps its existing override behavior.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): release the renewal lock when a pre-V2 agent holds typed intent

A node whose agent predates certificate renewal V2 can still record an interrupted typed renewal. V2 Start returns Unimplemented, which proves no typed work was accepted, but the workflow kept the operation pending, the old agent answered NotFound to the status check, and the cycle retained the cluster mutation lock. That also blocked the agent upgrade that would let the typed renewal finish.

New histories now fail the cycle with a message to upgrade the node agent and release the lock without resolving the never-accepted operation. A Temporal change ID keeps earlier histories on the previous path.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* test(controller): expect the fence reads in no-VIP remediation

Remediating a control-plane node reads the node and locks its cluster to check the control-plane mutation fence before deleting. The no-VIP remediation test added on main predates that fence, so its override case did not expect those reads.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(api): wrap the merged deleteNode VIP sentence

Wrap the deleteNode description line that combined the no-VIP development override from main with the stack's mutation-lock note, matching the surrounding wrapping. The embedded spec in the regenerated server code no longer contains an encoded run that the name check misreads as the old product name.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): restart terminated accepted scheduled renewal cycles

An accepted scheduled certificate-renewal cycle whose Temporal execution
was terminated or timed out kept the cluster mutation lock indefinitely.
The controller now starts the recorded cycle ID again with USE_EXISTING /
ALLOW_DUPLICATE_FAILED_ONLY, so the new run re-enters the cycle and
reattaches to the recorded node operation. Accepted forced cycles still
defer; the guide documents their manual recovery as the exception to
using a new workflow ID for every forced run.

The guide no longer claims every failure path restores the active
manifest, and states that a leftover V1 reservation refuses the first
node needing renewal, whichever node it names.

Fixes review findings for #1375: F2, F3 (option A), and DECISIONS #5.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* fix(controller): escalate stranded accepted renewal cycles

Re-dispatching an accepted scheduled cycle under its recorded ID was not
safe: the new run re-enters Begin indistinguishably from fresh admission,
can fail before reattaching the node reservation and then release the
mutation lock while the old run's node or kube-vip work may still be
outstanding.

The reconciler again requeues an accepted cycle without dispatching it
and defers whenever the mutation lock is held. An accepted cycle whose
Temporal execution has closed stays halted with ownership intact and
needs operator escalation. The guide drops the same-ID restart recipe
for scheduled and forced cycles, states what evidence an escalation
needs, and keeps the failed-cycle recovery procedure unchanged.

Tests observe each accepted case twice and assert no workflow start and
no database write; dispatch and released-failure retries are checked for
stable IDs across repeated observations.

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

* docs(controller): correct certificate-renewal recovery and failedNodeID wording

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>

---------

Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>
2026-10-26 14:57:18 +00:00
Dan Budris 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>
2026-10-23 11:40:55 -06:00
Jun Shun Zhang 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>
2026-10-22 18:52:16 +00:00
Abhinav Pandey 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>
2026-10-21 11:28:24 -07:00
Giuseppe Laguteta 6aa5166b3c feat(launchlayer): support external security group IDs (#1831)
Signed-off-by: Giuseppe Laguteta <glaguteta@nvidia.com>
2026-10-20 11:03:18 -07:00
Dan Budris 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>
2026-10-20 11:37:27 -04:00
dependabot[bot]andDavanum Srinivas 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>
2026-10-20 09:30:03 -04:00
Meet VadariaandClaude Opus 5.5 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>
2026-10-19 17:59:43 +02:00
pbikki 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>
2026-10-16 23:03:42 -04:00
vwilson-nvidia 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>
2026-10-16 14:24:14 -04:00
Davanum Srinivas 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 0384e4a375)

* ci: free disk before the package reproducibility builds

cni-ovn's double build used 7.6 GB of the 13 GB a fresh ubuntu-latest runner had free; a fuller one died with "No space left on device" on pull-request/1694 at 13:23Z 10-16.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
(cherry picked from commit 6fc0e7990ab96fa9eb0e91ef6e04a635e5917f17)

---------

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-10-16 11:42:52 -04:00
nko-cpuandClaude Sonnet 5.5 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>
2026-10-16 09:11:48 -04:00
Miancheng Lin 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>
2026-10-15 11:56:35 -07:00
vwilson-nvidia 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>
2026-10-15 14:31:04 -04:00
Davanum Srinivas 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>
2026-10-15 13:23:04 -04:00
pbikki 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>
2026-10-14 13:25:14 -07:00
Chao 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>
2026-10-14 11:26:08 -07:00
Alexander Greene 3038cf917c feat(controller): gate new Calico clusters (#1599) 2026-10-14 07:19:24 -07:00
Alexander Greene 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>
2026-10-12 16:36:45 -07:00
dependabot[bot]andgithub-actions[bot] 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>
2026-10-12 15:51:19 -06:00
Davanum Srinivas 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>
2026-10-10 23:25:47 -04:00
Davanum SrinivasandClaude Fable 5.1 3baba6d1b4 ci: give the name check its launch allowlist, and move the stragglers to the new name (#1484)
* chore: move test doubles, examples and stale references to the new name

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

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

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

* ci: give the name check its launch allowlist

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

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

Closes #1483

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

---------

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 19:24:52 -04:00
Davanum SrinivasandClaude Fable 5.1 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>
2026-10-10 18:28:35 -04:00
Davanum SrinivasandClaude Fable 5.1 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>
2026-10-10 17:29:16 -04:00
Davanum SrinivasandClaude Fable 5.1 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>
2026-10-10 16:31:31 -04:00
Davanum SrinivasandClaude Fable 5.1 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>
2026-10-10 16:03:26 -04:00
Jun Shun Zhang 7b1c662d56 test(oidc): add an in-process HTTPS issuer (#1414)
Signed-off-by: Steven Zhang <stevenzhang@nvidia.com>
2026-10-09 23:04:58 +00:00
Aaron Patten 48f5cab857 chore(controller): say controller, not CWE, in comments and log text (#1393)
Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-09 09:49:33 -06:00
Terry Howe 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>
2026-10-09 09:47:10 -06:00
Davanum Srinivas 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>
2026-10-08 21:00:59 -04:00
pbikki 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.
2026-10-08 17:00:49 -05:00
Alexander Greene 92a3039bae feat: default CNI to ovn-kubernetes (#1303)
* feat: default omitted CNI to ovn-kubernetes

Empty cniPlugin and cniName now select ovn-kubernetes, and local images, examples, and create scripts follow that default. calico remains an explicit override.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: build OVN packages outside the gitignored bin directory

crane was installed into the package tree's bin directory, which a checkout sync can delete while the download is still running. Stage the tool in the build scratch directory and create its destination immediately before moving it.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): complete pod checksums on the userspace datapath

veth pods send partial checksums, and the netdev datapath forwarded them unfinished, so receivers dropped pod traffic to services and the node. Enable userspace TSO and restart ovs-vswitchd only when the setting changes.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(tilt): label the local NICo cluster button inputs

The create dialog showed the defaults with no captions because text_input was called without label.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* feat(controller): ensure host vTPM proxy for nico-containers on Linux

Share ensure-vtpm-proxy.sh between Colima and bare Linux hosts, fail fast
from Tilt and nico-sim when /dev/vtpmx is missing, and document the one-time
host prep so remote Tilt targets do not hang waiting for kubeconfig secrets.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: load the vTPM proxy on the kernel that runs Docker

Container nodes need /dev/vtpmx. Without it, swtpm never starts and nke-agent blocks while setting up SPIFFE, so provisioning looks stuck. Colima already loaded the module inside its VM, but a Linux host never did. One script now does that load, and make host-up runs it on either machine.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): keep an explicit OVN version when the plugin name is omitted

Kubeadm init with no plugin name defaults to OVN, but a version sent with that request was discarded and 1.4.0 was installed instead. The requested version is used, and 1.4.0 is applied only when none was given.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): retry userspace TSO after a failed ovs-vswitchd restart

ovs-vswitchd reads userspace-tso-enable only at startup. A failed restart left the setting enabled, so the next attempt treated it as already applied and never restarted the daemon. The previous value is restored on failure so the restart is tried again.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): install the CNI image package selected for a Forge sample cluster

The Forge sample accepts CNI_PLUGIN=calico, but both node pools always installed the OVN image package. The pre-kubeadm commands now install the Calico images for Calico and the OVN images for OVN.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: rebuild CAPD OVN assets when any package is missing

capd-image skipped preparing OVN assets when the charts package was present and newer than the script, even if the images or Helm package was gone. It now rebuilds when any of those packages is missing, and still rebuilds when the prepare script is newer than the charts package.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): fail the nico-vms sample create on HTTP errors

The create request returned success on a 400 or 401 because curl exits 0 unless --fail is set, and --fail hides the body. The response stays visible, and the script now exits from the HTTP status.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): check the vTPM device in the configured Colima profile

The macOS check ran colima ssh without a profile, so a non-default COLIMA_PROFILE could be reported missing or present against the wrong VM. The device checks now use the same profile colima-start.sh prepares.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: default each CAPD OVN package path on its own

Setting CAPD_CNI_CHARTS_DEB_PATH skipped the images and Helm packages, so the node image was built without them. Each path is filled in when it is unset, and each one is checked before the image build.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): run container nodes on the kernel Open vSwitch datapath

Userspace Open vSwitch encapsulates Geneve but has no port that can emit it, so traffic between container nodes is dropped. Container nodes now load the host kernel module and keep the dummy gateway bridge.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: drop the duplicate /lib/modules mount from CAPD nodes

Kind already bind-mounts the host module tree read-only, so listing it again in extraMounts makes Docker reject the node container.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(cli): load the vTPM proxy without sudo when already root

The arm64 bootstrap runner executes the job as root, and its sudoers file rejects sudo from root, so the e2e died after the fake nodes were ready.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: rebuild the CAPD Helm package when the OVN asset script changes

The Helm freshness check compared prepare-ovn-assets.sh with the charts package, so a newer script could leave a stale nke-e2e-helm.deb in place.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): create the sample CAPD cluster through controlPlaneConfig

The local controller rejects control-plane node pools, so the sample script's node pool was rejected before a cluster was stored.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: build the CAPD bundle mirror for the Docker daemon's architecture

The legacy bundle path defaulted to amd64 OVN packages, so an arm64 daemon was served image debs it cannot install.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(agent): reject an unknown CNI plugin instead of installing OVN

The empty-plugin default already lives in the kubeadm init helper. The installer was also rewriting a typo to ovn and mutating the request.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix: rebuild the CAPD OVN images package when the asset script changes

The images freshness check compared prepare-ovn-assets.sh with the charts package, so a newer script could leave a stale images deb in place.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(api): waive omitting cniPlugin on cluster create

An omitted plugin selects ovn-kubernetes. Clients built against the published spec were required to send the field, so the compatibility gate needs a named waiver.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* fix(hack): target the configured Colima profile for VM setup

SSH, stop, and the failure hints used Colima's default VM, so a non-default profile never received the vTPM module or the Docker limits.

Signed-off-by: Alex Greene <algreene@nvidia.com>

* docs(agent): note that bare metal also uses the kernel datapath

The container check keys off NKE_OVS_DATAPATH_TYPE. An unset variable keeps bare metal and VM nodes off the dummy-bridge path even though they run the kernel datapath.

Signed-off-by: Alex Greene <algreene@nvidia.com>

---------

Signed-off-by: Alex Greene <algreene@nvidia.com>
2026-10-08 16:45:49 -04:00
Dan BudrisandClaude Opus 5.5 a0326eec29 build: bump Go to 1.27.2 and golangci-lint to v2.14.0 (#1349)
Go 1.27.2 carries security fixes in html/template, net/http, HTTP/2,
net/textproto, crypto/tls, and two cmd/go checksum bypasses.

golangci-lint moves with it. Go 1.27.2 writes compiler export data
version 5, which v2.13.2 cannot read, so lint failed on every module.
v2.14.0's loggercheck flags slog values that may panic when nil; agent
now logs bundle versions through a nil-safe utils.VersionString.

Signed-off-by: dbudris <dbudris@nvidia.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:16:55 -04:00