Files
nvke/controller/hack/local-controller-config.yaml
Eric Staples d61d8a3c92 feat(controller): move a pending control-plane node out of a full failure domain (#2280)
* feat(controller): move a pending control-plane node out of a full failure domain

When CAPNICo reports FailureDomainUnavailable for a control-plane node's
requested domain past a grace period, patch the Machine's failure domain to
the least-used eligible domain the node has not tried, cycling once every
domain has been tried. Gated by controlPlaneFailureDomainFallback in
nvke-controller-config, off by default.

Failure-domain discovery and the allocator move to internal/failuredomains so
the provisioning activity can reuse them. nico-sim gains a configurable
failure-domain layout, and a nico-containers e2e spec covers the move.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* feat(controller): keep the failure-domain fallback and stuck-pending re-placement from overlapping

With the fallback enabled, the stuck-pending reconciler leaves domain-pinned
pending control-plane nodes to the provisioning activity, which moves them in
place. Both acted on the same FailureDomainUnavailable signal on different
clocks, so a moved node could be deleted after one CAPNICo retry.

The rotation now stamps the domain it leaves in the cluster's
UnplaceableFailureDomains, so scale-up, remediation, rollout and rebalance
stop choosing the emptied, still-full domain for the next 3 hours. When
picking the next domain it tries marked domains only after every unmarked
one.

The rotation skips rebalance surges. A surge is placed in the domain of the
node it replaces; moving it can leave two members in one domain after the
shed, and rebalance already abandons a surge that cannot get capacity.

The unplaceable-domain helpers move to the failuredomains package so the
reconciler and the activity share them.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* feat(controller): replace stuck-pending delete with the failure-domain move

Moving a pending control-plane node to another failure domain is now the
only way the controller handles a domain CAPNICo reports out of capacity.
The stuck-pending reconciler, which deleted such a node after 15 minutes
and recreated it elsewhere, is removed along with the
controlPlaneFailureDomainFallback.enabled setting that chose between them.

The move now also leaves a node with a delete in flight alone.
controlPlaneFailureDomainFallback.gracePeriod stays; unset, it defaults to
10 minutes, and a non-positive value is refused at startup and by the chart.

FailureDomainUnavailable leaves the MachineMaterialization interface, since
only the stuck-pending path called it.

The e2e spec gains a scale-up case: with every domain but one out of
capacity, scaling the control plane to three moves the stuck Machine in
place and fails if any control-plane Machine is deleted.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* feat(controller): Surge releases the domain of the first rollout target without a delete in flight

Signed-off-by: Eric Staples <estaples@nvidia.com>

* feat(controller): mark the domain unavailable and update the node in the same transaction

Signed-off-by: Eric Staples <estaples@nvidia.com>

* feat(controller): make the failure domain check more readable

Signed-off-by: Eric Staples <estaples@nvidia.com>

* fix(controller): retry a failure-domain move on Machine patch conflict

A conflict on the optimistic-lock Machine patch now waits for the next
poll instead of failing the activity. Cover the surge-domain release by
driving reconcileNodesNeedingRollout, and document the gracePeriod
positivity constraint in the chart README.

Signed-off-by: Eric Staples <estaples@nvidia.com>

* fix(controller): finish an interrupted failure-domain move once the node has an IP

When the Machine patch of a failure-domain move succeeds and the row
update fails, the next poll records the move. That repair ran only from
the rotation path, which waitForCAPIMachineReady reaches only while the
Machine has no IP, so a node that got an address in the new domain kept
the old domain in its row. The repair now runs on every poll, before the
IP check.

A repaired wrap-around move rebuilt the tried list by appending the
departed domain to the old history instead of restarting it. When the
Machine's domain is already in the tried list the move was a restart,
so only the departed domain is kept.

Signed-off-by: Eric Staples <estaples@nvidia.com>

---------

Signed-off-by: Eric Staples <estaples@nvidia.com>
2026-12-01 09:43:04 -05:00

130 lines
3.6 KiB
YAML

# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# nvke-controller-config for host-local runs: make run, make run-local,
# make run-remote, make debug, and the gofail e2e worker. A deployment gets the
# same file from the chart instead. Every key is listed explicitly so
# TestLocalControllerConfig checks that this file still loads and sets them all.
#
# To change a setting for your own runs, copy this file under .local/ and point
# CONTROLLER_CONFIG_PATH at the copy.
agentReadiness:
workers: 8
timeout: 30s
interval: 2m
jitter: 0.1
fieldManager:
name: cloud-workflow-engine
rebootMachineName: cloud-workflow-engine-reboot-machine
machineHealthIssueName: cloud-workflow-engine-machine-health-issue
managedByLabelValue: cloud-workflow-engine
# The shared management-plane namespace. Tilt creates it (deploy/k8s/nvke-system-namespace.yaml).
managementNamespace: nvke-system
rbacConfigMapName: nvke-rbac
metricsListenAddress: 127.0.0.1:9090
supportedInfraProviders:
- nico
nodeMetadataAllowlistedLabelKeys: []
machineMetadataAllowlistedLabelKeys: []
machineMetadataAllowlistedAnnotationKeys: []
tracing:
enabled: false
endpoint: ""
insecure: true
serviceName: cloud-workflow-engine
certRenewal:
controllerEnabled: true
interval: 12h
thresholdDays: 30
credentialMonitoring:
enabled: true
inspectionInterval: 1h
observationMaxAge: 3h
warningDays: 45
controlPlaneFailureDomainFallback:
gracePeriod: 10m
kubeVip:
localASN: 65100
staticPeerASN: 4294967000
kubeadmImageRepository: registry.k8s.io
cniImageRegistry: ""
installCNIAfterInit: false
allowLegacyCalicoClusterCreation: false
allowControlPlaneWithoutVIP: false
clusterSelfAdoptionEnabled: false
nicoControllersEnabled: false
bootstrapControllersEnabled: false
profilesDir: test/fixtures/profiles
runbooksDir: test/fixtures/runbooks
tenantAccessEnabled: false
nodeAgent:
updateMethod: ""
spireAttestationMethod: tpm
dsxImds:
endpoint: http://169.254.169.254
pluginChecksum: ""
operatorTenant: ""
tlsJWT:
enabled: false
issuer: ""
jwksURI: ""
algorithms: []
subjectTrustDomain: ""
dsxIdentityExchangeURL: ""
subjectTenant: ""
subjectService: ""
externalMTLSEnabled: false
oidc:
managementOIDCAuth:
enabled: false
issuerURL: ""
discoveryURL: ""
caBundleSecretRef:
namespace: ""
name: ""
key: ""
providers: []
temporal:
hostPort: localhost:7233
namespace: cloud-workflow-engine
taskQueue: cloud-workflow-engine-tasks
tls:
caCert: ""
clientCert: ""
clientKey: ""
serverName: ""
spire:
spiffeEnabled: false
spiffeEndpointSocket: unix:///tmp/spire-agent/agent.sock
spiffeJWTExchangeEndpoint: ""
serverNamespace: spire-server
className: spire-mgmt-spire
tpmPubhashesConfigMapName: tpm-pubhashes
serverPort: "9091"
joinTokenTTL: 1h
teleport:
enabled: false
identityFile: ""
proxyAddress: ""
environment: non-prod
managedByLabelValue: nvke-controller
acceptedManagedByLabelValues: []
tokenNamePrefix: nvke-controller-
resourceGroupLabelValue: nvke
# Off for host-local runs, as it was before the section existed. To run with
# authentication, set enabled and give audiences and issuers the shape the
# chart's apiAuth.config takes.
apiAuth:
enabled: false
audiences: []
issuers: []
permissive: false
# Off for host-local runs. To authorize API requests, turn on apiAuth, set
# enabled, and point dir at a LocalBundle directory.
apiAuthz:
enabled: false
permissive: false
authorizer:
localBundle:
dir: ""