When the chart renders the API authentication configuration (apiAuth.configMap.create), the controller now reads it from an apiAuth section of nvke-controller-config instead of the file at AUTH_CONFIG_PATH. auth/authn stays the only owner of the schema: the section reuses authn.Issuer and is validated with the new Config.ValidateStartup, which authn.Load also uses. The section is required and carries an explicit enabled switch, so a missing section is a startup failure rather than "off". A section filled in but switched off is refused, and enabling it while AUTH_CONFIG_PATH is set is a startup failure. A ConfigMap managed elsewhere keeps the AUTH_CONFIG_PATH path, and the chart still renders the authentication ConfigMap for nvkectl and extraFiles. The CAPD e2e lane moves to the chart-rendered configuration; Tilt and capnico-e2e keep the external ConfigMap, so CI covers both. The e2e suite and the token and demo scripts treat either source as authentication being on, whichever name the settings ConfigMap has. The auth-mode gauge now follows whether authn.Setup built an authenticator. Also renames the remaining references to the settings ConfigMap, nke-controller-config, to nvke-controller-config, the chart's default since #1769, in docs, comments, test messages and help text. Kept: the legacy pins and fallbacks for installs that predate the rename, and the "Loaded nke-controller-config" startup log line, which the e2e OIDC site helper matches and released images still print. Includes the design doc, controller/docs/api-auth-in-controller-config-design.md. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>
3.1 KiB
{/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. /} {/ SPDX-License-Identifier: Apache-2.0 */}
Node-agent readiness scheduling
The node-agent-health controller periodically calls the node agent to obtain
its version and reconcile NodeAgentReady. It uses a bounded worker pool and a
dedicated deadline for each reachability RPC. Settings come from the
agentReadiness block of nvke-controller-config's config.yaml, loaded once at
startup. The Helm chart renders it from nodeAgent.readiness values:
agentReadiness:
workers: 8
timeout: 30s
interval: 2m
jitter: 0.1
Workers, timeout and interval must be positive. Jitter must be finite and in
[0,1); set 0 to disable it. The chart and host-local config supply the values
above; the file loader rejects omitted or zero workers and durations. A
programmatically constructed config still defaults zero workers and durations,
while zero jitter disables jitter.
The NODE_AGENT_READINESS_* environment variables are no longer read, and the
chart rejects them in its env list. Change the ConfigMap (or the file named by
CONTROLLER_CONFIG_PATH for host-local runs) and restart the controller to apply
new settings.
The interval is a delay after completion, not a promise to visit every node within two minutes. Actual freshness includes queue wait and probe duration. Initial inventory events can arrive together. Jitter spreads later requeues; it does not spread that initial burst or impose a global request rate limit. Database changes and the source's 15-minute inventory resync can enqueue nodes before their periodic delay expires, producing additional bursts. A sustained slow cohort can consume all workers, but each RPC attempt has a bounded deadline. Database operations use the reconcile context; the RPC deadline does not bound the entire reconcile. Tune the worker count and deadline against fleet size, observed network/authentication latency, and database capacity.
agentReadiness.timeout controls agent reachability probes.
NODE_HEALTH_CHECK_TIMEOUT governs the separate tenant node health check.
A probe timeout marks the agent unready. Lifecycle controllers consume this
condition for readiness, patch selection, and remediation decisions.
The queue deduplicates keys and prevents concurrent reconciliation of the same node. Readiness updates use transaction locking, deletion checks, and condition comparison. Unchanged successful probes do not write to the database. Manager shutdown cancellation returns without marking a node unready.
Metrics on the controller's Prometheus endpoint:
nvke_controller_node_agent_probes_active: active agent RPCs, bounded by the workers in this process.nvke_controller_node_agent_probe_duration_seconds{outcome="success|timeout|canceled|error"}: RPC latency histogram, including transport setup.
Labels have no node identity, keeping cardinality bounded. Use histogram counts for probe outcomes and the active gauge to see worker occupancy. Controller-runtime queue metrics use a separate registry; exposing these probe metrics does not also expose that queue registry.