mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
main
866
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
61c069125f |
docs(release,e2e): describe streams by capability, not by site (#2596)
* docs(release): describe streams by capability, not by site policy.yaml already states that a stream names capabilities, not the infrastructure that satisfies them, and that which runner label, site or subnet a capability resolves to is an environment knob belonging to the e2e suite's own config. Several stream and scope comments described that infrastructure instead: the fleet behind a lane, its server model and CPU, and which lane sits where. Rewrite them to name the stream rather than the site. No stream name, capability, selector or parameter changes, so no run plan changes. Signed-off-by: Jayson Du <jaydu@nvidia.com> * docs(release,e2e): extend to the environment config and the perf stream The same pattern as the previous commit, in the two places it missed. The Forge perf stream's comments in policy.yaml named a site and the machine type its nodes land on. The DSX environment file described each datahall's fleet: the server model, the CPU, and what every machine at that site carries. dsx.yaml already states the rule it broke. It keeps identifiers out of the file and reads them from the process environment, and its keys name a site without identifying it, "the way forge.yaml's site-1 and site-2 do". The comments beside those keys did not follow it. Comments only. No key, value, variable reference or `provides` map changes, so no environment resolves differently and no run plan changes. Signed-off-by: Jayson Du <jaydu@nvidia.com> * docs(release,e2e): fix the wording the review caught Two of these were wrong rather than loose. "a second environment" read as a second environment file, which does not exist: `parameters.environment` names one file, and both DSX streams run against dsx.yaml, resolving to different site keys inside it. "binds eight of them" lost its referent when the server model went, so "them" attached to accelerators. The type binds eight machines, which is what the sentence after it counts against. The rest: referents left dangling once a site name was removed, the vr200 stream's reason restored, the per-arch scope comment reworded so it stays true as DSX streams are added, and the DPU and FLAT VPC detail dropped from policy.yaml, where it duplicated dsx.yaml and was the one place this rewrite had not applied its own rule. Comments only, as before. Signed-off-by: Jayson Du <jaydu@nvidia.com> * docs(release,e2e): shorten the accelerator in the rewritten comments The two comments that name this stream's accelerator in passing now say vr. The stream name, its capabilities and the `provides` map beside them are unchanged, so nothing resolves differently. Signed-off-by: Jayson Du <jaydu@nvidia.com> --------- Signed-off-by: Jayson Du <jaydu@nvidia.com> |
||
|
|
ce31e1ce52 |
revert: "feat(controller): accept controlPlaneEndpoint on cluster create (#2515)" (#2594)
Signed-off-by: Nathan Herz <nherz@nvidia.com> |
||
|
|
30010e18bd |
feat(controller): add the etcd defragmentation rollout operation (#2371)
* feat(controller): add the etcd defragmentation rollout operation Adds DefragOperation, which defragments one control-plane etcd member per node by asking the node agent to restart it so etcd defragments during bootstrap. The agent already owns the dangerous parts: it probes voting members for quorum, transfers leadership away, parks kube-apiserver, and refuses outright when any of that is unsafe. This operation decides which members are worth restarting, drives the asynchronous call, and translates the agent's verdict into a rollout outcome. It reads GetEtcdStatus before calling StartEtcdDefrag rather than letting the agent decide alone. The agent reports an unhealthy member, a cluster too small to lose one, and a member below its bootstrap-defrag threshold through a single OUTCOME_REFUSED, so a refusal on its own cannot say whether the rollout should shrug or stop. Below threshold is the normal steady state, not a fault. Filtering that case first leaves a refusal meaning a genuine precondition failure, which maps to a clean halt. The idempotency key is derived per node from a base minted once per rollout. The framework delivers the payload byte-identical to every ApplyToNode and across a Temporal replay, so a retry resumes the in-flight defragmentation rather than restarting etcd twice; a single shared key would be worse than none, because the second node would receive the first node's completed operation and report success without restarting anything. Outcome mapping is total and fails closed. Reclaiming nothing is Unchanged rather than a failure: the member restarted, came back healthy and holds mostly live data, so failing would halt the rollout and drop a healthy member from the replica floor. A poll that never reaches a terminal phase is FailedNotRestored, because etcd may be down with kube-apiserver parked behind it. An unrecognized outcome is treated as unknown node state so a future agent enum value cannot read as success. Only SUCCEEDED and FAILED count as terminal. An unset phase is what an absent status field reports, and treating it as terminal would read a not-yet-written status as a verdict and cascade a rollback over a node that is busy succeeding. There is deliberately no RollbackHandler. A defragmentation is not reversible and leaves nothing to undo. The operation is registered but nothing invokes it yet: no RolloutSpec and no workflow drive it. Wiring and a trigger follow separately. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): resolve an in-flight etcd defragmentation before deciding Three corrections to the defragmentation operation, all cases where a verdict claimed more than the code could know. ApplyToNode now resolves the operation ID before checking eligibility. The ID is derived from a payload the framework delivers byte-identical to every retry, so a record already under it means an earlier attempt started this node and the member may be down right now. Reading GetEtcdStatus first turned that into an unreachable member and returned FailedRestored, which tells the executor to halt cleanly while kube-apiserver is parked behind a down etcd. A resolved operation is now followed instead, so a retry resumes rather than re-qualifying, and a resolve that cannot be answered at all reports unknown state rather than restoration. A failed StartEtcdDefrag is classified by starting again rather than by asking for status. The agent never observes the RPC context, so a lost reply leaves a handler still on its way to recording the operation, and a status probe can be answered NotFound while that is true. A second start cannot be: the agent serializes starts on one mutex and returns the existing operation for an ID it has already published, so the retry blocks behind any in-flight handler and observes whatever that handler did. An error only the handler can author, InvalidArgument or FailedPrecondition, skips the retry: it proves the handler ran and returned before touching the node. The per-node timeout now covers the whole call. Nothing in the dialer contract imposes a deadline, so the dial, the resolve and the start were bounded only by the caller's context and could hang past the point where the operation was meant to produce a fail-closed verdict. Hoisting the deadline means a parent deadline expiring would surface as DeadlineExceeded on the derived context and be misreported as the node overrunning its own budget, so the timeout carries a cause and the poll loop branches on that instead. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): do not report an unreachable agent as a restored node A dial failure returned OutcomeFailedRestored, which tells the executor the operation put the node back. The dial runs before the operation can be resolved, so nothing at that point distinguishes a first attempt from a retry whose earlier attempt already has the member down, and the agent listens independently of etcd and kube-apiserver, so failing to reach it is not what a node mid-defragmentation looks like. An unreachable agent is now unknown node state. A dialer that was never configured keeps the clean halt: it is a wiring error that provably emitted nothing. The resolve call is also no longer thrown away when it already carries a terminal phase. It was handed to awaitDefrag, whose first poll asks the same question again, so a terminal answer cost an extra RPC and was lost entirely if every poll from there to the node deadline failed -- reporting unknown state over a verdict the agent had already given. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): recover from an etcd defragmentation the agent restarted out of Resolving the operation before deciding, added in the previous commit, wedged the node when an agent restart interrupted an attempt. The agent reports a record left non-terminal with no worker behind it as FailedPrecondition, which the resolve treated as unreadable state and answered with FailedNotRestored. StartEtcdDefrag is the only caller of resetInterruptedEtcdDefrag, so the one thing that clears a stale record was never reached and every retry resolved to the same error. The verdict was also backwards. ReconcileInterruptedStaticPodParks runs before the agent serves, so an agent answering at all has already put back whatever the interrupted attempt parked; the node is restored, not out of service. That state now falls through to start again, which clears the record and makes a fresh attempt. It is not a blind restart: the interrupted attempt may have got as far as restarting etcd, and the eligibility check that follows leaves an already-compact member Unchanged. The fake agent can now also record an operation before a failing start returns, which is the lost-reply case the start retry exists for and could not previously be expressed -- it only covered a start that never arrived. A counter of starts the fake accepted distinguishes a retry answered with the existing record from one that would defragment a second time. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): do not let a retry restore a claim the first start gave up A refusal answering the retried StartEtcdDefrag was mapped to OutcomeFailedRestored on the grounds that only the agent's handler authors InvalidArgument and FailedPrecondition. That proves a handler ran, but not that it was the first start's handler. A refusal can come from an unrelated defragmentation holding the operation type while the first start is still queued on operationStartMu, and that start can publish and park the node once the other one ends -- after the rollout has already reported the node restored. Any failure of the retry now reports unknown node state. The first attempt keeps its clean halt, where a refusal is unambiguous: one start was made and the agent answered it, so no handler of ours is outstanding. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): correct two comments that claimed more than the code knows The interrupted-attempt arm said the agent had put back whatever the attempt parked before it began serving. It tries to, but main.go logs and carries on when that fails, so reaching that arm is not proof the node is back. Starting again is still the recovery, because it is the only thing that clears a stale record, and the start that follows is gated on the agent's own preconditions. startDefrag's doc comment still argued that a second start observes whatever an in-flight handler did, which the previous commit established is not true: the retry can take the mutex first and the first start can publish afterwards. It now says what the retry does establish -- that a start whose reply was lost resumes rather than restarting etcd twice -- and that a failed retry settles nothing. Also covers two outcome claims that had no test: an eligibility read that fails on a fresh attempt halts cleanly, and a dialer that reports success while returning no client reports unknown state and still runs its cleanup. Renames the subtest that claimed to cover a lost reply but did not, now that the fake can express that case and a real one sits beside it, and stops worthDefragmenting shadowing the grpc status package. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): give one node longer than the agent gives itself The per-node budget was ten minutes, which the agent spends on the etcd health wait alone. That wait sits in the middle of the sequence: the static-pod parks and the etcd container restart come before it, and restoring kube-apiserver, polling its /readyz and bringing kube-vip back come after, for about twenty minutes of serial waits in total. A slow but successful defragmentation therefore reported FailedNotRestored, and cascaded, before the agent had finished putting the node back. Expiring first buys nothing. The agent owns the node and has its own give-up points, each of which ends in a return to service; this deadline only decides when the controller stops waiting for that verdict. Records the activity-options ceiling behind this one as well. Nothing dispatches this operation yet, and when something does, the shared WithRolloutNodeAgentApplyOptions would cap a single attempt at eight minutes and cut a defragmentation off with the node withdrawn. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): stop a recovering node being reported as restored The eligibility gate ran on the recovery path as well as on a first attempt, where both of its answers claimed more than the controller can see. An agent restart mid-defragmentation may leave kube-apiserver and kube-vip parked; the agent puts them back on startup but only logs when it cannot, and no field in node_agent.proto reports whether it managed to, so that node's service state is unknown. etcd is never parked -- kubelet owns its restart -- so GetEtcdStatus answers healthy either way. A read that failed returned FailedRestored for a node nothing here had looked at, and a member below threshold returned Unchanged. The second is the worse one: a small member is the signature of an attempt that got as far as restarting etcd, which is exactly the attempt most likely to have died before returning the node to service. Both verdicts are now unreachable while recovering, because the gate is a first-attempt question only. Skipping it is also the repair: the agent restores the park directory whether its sequence finishes or fails, and parking an already-parked manifest is a no-op for it, so running the sequence is what puts the node back. That leaves refusals, which the agent produces in preflight before touching anything. On a first attempt that is a node left as it was, so the rollout still halts cleanly; recovering, it restores nothing the interrupted attempt parked, so it cascades. An agent verdict of FAILED_RESTORED is deliberately not demoted, since the agent verified the member healthy before restoring the manifests. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * fix(controller): do not let a resolved refusal claim verification The attempt kind was a local, so it survived one ApplyToNode call and no longer. Both resolve branches then hard-coded a first attempt, and a refusal the agent produced during a recovery was read back on re-entry as a node left untouched. A recovery refusing is the likely case rather than a corner one: the agent's preflight declines a member whose reclaimable space is already below the threshold, which is exactly what an interrupted attempt that got as far as restarting etcd leaves behind. What decides a refusal is not whether this run is a recovery but whether this invocation established the node was in service before the run began, so the type now says that. A run resolved from a record the agent already holds is unverified either way: the record carries no provenance, and the worker behind a non-terminal one restores the node only on its way out of a sequence a refusal means it never entered. This needs no change to the proto or the status contract, because the conservative verdict is available locally. The exposure is narrow in any case: a business failure does not retry the activity, since the error rides back in ApplyToNodeResponse.ApplyErr with a nil activity error, so re-entry needs the activity itself to be lost between the agent persisting the refusal and the result being recorded. Signed-off-by: Justin Hopper <jhopper@nvidia.com> * docs(controller): stop the recovery comment promising a cure The comment justifying the recovery path said that running the sequence is what puts the manifests back, which holds for any sequence the agent actually runs and skips the likeliest answer. The agent declines a member whose reclaimable space is already below the threshold -- exactly what an interrupted attempt that got as far as restarting etcd leaves behind -- and it declines before taking anything out of service, so it puts nothing back either. Starting is still the only lever the controller has, so the path is unchanged. What the comment now says is the narrower thing the code actually guarantees: a refusal there is reported as unknown rather than as a node restored. Signed-off-by: Justin Hopper <jhopper@nvidia.com> --------- Signed-off-by: Justin Hopper <jhopper@nvidia.com> |
||
|
|
55c3d0eaea |
feat(e2e): NVKE validation image and qualify validate (#2401)
* feat(e2e): validation profile and label exclusions for the validation image Sites whose layout differs from deploy/nico can now configure the validation image without their layout living in this repo. - NVKE_VALIDATE_PROFILE names a YAML file keyed by the existing environment variable names. It fills only unset or blank variables before the suite is built; the environment wins over the profile, and the profile over the built-in defaults. Keys outside an allowlist, including the run switches and per-tenant identity, fail the run. - NVKE_VALIDATE_EXCLUDE_LABELS ANDs label exclusions onto the label filter. It refuses site-validate and tenant-validate, and fails a run left with no specs. - Check 31 gains the issues-certificate label so sites whose approver policy blocks self-signed issuers can leave it out. - siteNamespaces and siteLaneChecks become functions so they see profile-set values. - The image workflow dry-runs the entrypoint with a good and a bad profile. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): tighten validation profile and exclusions after review - NVKE_VALIDATE_EXCLUDE_LABELS takes only labels from an allowlist, so far issues-certificate. A deny-list let a profile drop the health and version checks it is barred from controlling, and accepted typos. - A variable set blank wins over the profile, so a run can get a built-in default back. The profile is applied with t.Setenv so its values end with TestE2E. - The exclusion is recorded by the JUnit LabelFilter property rather than a per-container report entry that some runs never wrote. - The drift test scans the whole module, internal packages included, for every input prefix; NKE_E2E_AUDIENCE becomes a profile key and the auth switch, token TTL and lane-only inputs are excluded with reasons. - siteNamespaces takes the controller namespace from the settings it reads rather than the process environment. - The loader refuses blank values, empty lists and extra documents. - The image workflow checks the bad profile fails for the right reason. Signed-off-by: Ron Compos <rcompos@nvidia.com> * feat(e2e): cert-manager approval as a site fact in place of label exclusions Signed-off-by: Ron Compos <rcompos@nvidia.com> * feat(e2e): declare what the site lane installs Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): keep lane tenant probes out of default and refuse reuse on the site lane Signed-off-by: Ron Compos <rcompos@nvidia.com> * feat(e2e): keep the site and tenant kubeconfigs in the run's key dir Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): drop the temp kubeconfig from the keep log and say cluster in the PVC skip Signed-off-by: Ron Compos <rcompos@nvidia.com> * docs(e2e): run the validation image against a kept site Signed-off-by: Ron Compos <rcompos@nvidia.com> * feat(e2e): run the validation image from a workstation hack/validate-site.sh runs the validation image with Docker against a site, from a site file kept outside the repository: how to reach the site (a kubeconfig, a Teleport kube proxy, or an SSH forward, which a kept qualify run can fill in), the profile, the image and the two versions. Read-only by default; --full, --only and --dry-run select the checks. Each run keeps its reports, log and inputs, without credentials, and prints failures and skip reasons. The README documents it, and says read-only runs still create a short-lived probe pod. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): wait for Docker and read tsh's local proxy in validate-site.sh A Docker daemon waking from idle fails its first requests, which the script took for a missing image. It now waits for the daemon and pulls only when the image is not there, and shows any other error. tsh v18 prints the local proxy's kubeconfig on stderr, and that kubeconfig keeps the Teleport server and listens as proxy-url. The script reads both streams and points a loopback proxy-url at host.docker.internal. Signed-off-by: Ron Compos <rcompos@nvidia.com> * docs(e2e): run the validation Job with a profile, and tidy validate-site.sh deploy/validate-site.yaml gains commented blocks for a profile mounted from an nvke-validate-profile ConfigMap and for the CertificateRequest rule NVKE_SITE_CERT_MANAGER_APPROVAL=policy needs. "Running it on a site" says how to create the ConfigMap and when to uncomment each. validate-site.sh counts only specs in its summary, not [AfterSuite], runs the image on its own platform, and its header mentions the proxy-url rewrite for tsh's local proxy. Signed-off-by: Ron Compos <rcompos@nvidia.com> * feat(e2e): add qualify validate and NVKE_SITE_SCOPE - qualify validate runs the validation image against a kept Forge site (--run-dir), a Teleport cluster (--teleport-cluster) or a kubeconfig, building the image from the checkout unless --image is given. It replaces hack/validate-site.sh. A kept site now records its node, jump host and kubeconfig in node-keys/<node>.json for it to read. - NVKE_SITE_SCOPE=namespaces holds the workload, pod, certificate, Argo CD and CloudNativePG checks to the site's namespaces and its components'. What they find elsewhere is reported, failed or not, and fails nothing. - Check 24 reports anonymous access as not checked where a proxy turns the request away at TLS, as Teleport's does. - Check 31, under approver-policy, reports issuance as not checked where no Ready CertificateRequestPolicy selects its Issuer, following approver-policy's own selection rules. - Lint fixes in earlier files on the branch. Signed-off-by: Ron Compos <rcompos@nvidia.com> * docs(e2e): fix validation image tag examples and site Job notes - Use v0.23.1 in the image build, push, run and FROM examples; a controller/vX.Y.Z tag publishes nothing. - List v* release tags, without nightly betas, when keeping a site's image current. - Say which tags have the Dockerfile and deploy/. - Running it on a site: how to run without the creates checks, link NVKE_SITE_SCOPE and a shared site, note that older images ignore scope and profiles, and point to running from a workstation. Signed-off-by: Ron Compos <rcompos@nvidia.com> * docs(e2e): spell out what qualify validate needs from a workstation - List the tools each mode needs, and that --image must be pulled first. - Say which checkout the built image tests, and when to pass --image. - Give each mode its own steps and credentials: the jump host login for --run-dir, tsh login and tsh kube ls for --teleport-cluster, and a kubeconfig without exec plugins for --kubeconfig. - Table the inputs and where each value comes from. - State the RBAC, the probe namespace, the controller API token, and what a run writes and leaves. Signed-off-by: Ron Compos <rcompos@nvidia.com> * docs(e2e): state what qualify validate expects of the image - Say what an --image must keep from the Dockerfile: the mounts, the ENTRYPOINT report paths and the ENV switches the run relies on. - Note that the container runs as your user and on the image's platform, and that no published image exists yet. - Say the identity, not the label filter, keeps a run from changing the site, and use the validate-site.yaml roles rather than admin on a shared site. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): keep the site connection through an interrupt and skip checks that tested nothing - qualify validate: give the site connection its own context, ended only after the suite exits, so the suite's cleanup still reaches the site on an interrupt. Start docker and tsh in their own process groups, so the suite gets one interrupt and Ginkgo does not skip its cleanup. - Check 31: skip with the reason, rather than pass, when no CertificateRequestPolicy selects its Issuer. - Check 24: skip, rather than pass, when a proxy refuses the anonymous request before the API server; binding and identity problems still fail. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): refuse run switches, fail empty runs, pin the issuerRef group and keep kube-system in scope qualify validate refuses to start when NVKE_SITE_VALIDATE, NVKE_E2E_REQUIRE_EXPECTED_VERSION or NKE_E2E_AUTH_DISABLE is set, even to nothing, and exits non-zero when no check passed. The cert-manager check writes the issuerRef group, from the same helper its policy pre-check matches against. A scoped site always includes kube-system and the controller's namespace. The README notes that the pre-check does not cover the RBAC use binding. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): bound the SSH handshake, pin the kept node's host key, and tighten the run summary and inputs qualify validate: - kills the relay when the SSH handshake takes more than a minute - holds a kept node to the host key its record now carries, and refuses a record without one - refuses --context outside --kubeconfig - deletes a reused --out's old report before the run - lists failed suite nodes in the summary The suite records the node's host key in the kept-site record, rejects an empty validation profile, and reports a denied certificate request as not failing the check. The README reads --controller-version from /api/version, not the image tag, and says the Job's env wins over a profile. Signed-off-by: Ron Compos <rcompos@nvidia.com> * feat(e2e)!: typed, versioned validation profile Replace the flat NVKE_SITE_* profile with a validate.nvke.dev/v1alpha1 ValidationProfile, strictly decoded and described by a JSON Schema. Retired description variables fail the run, naming their field. NVKE_SITE_VALIDATE, _KUBERNETES_VERSION and _WORKLOAD_VERSIONS become NVKE_MGMT_CLUSTER_*, and the site-validate label becomes mgmt-cluster-validate. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): find the profile tests' files from their source, and drop an old name The suite binary runs from another directory in the CAPD and NICO jobs, so the README, schema and input-coverage tests now read from the package's source directory. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(qualify): harden qualify validate and use neutral example names - Refuse a run with no --run-dir, --teleport-cluster or --kubeconfig, rather than fall back to the default kubeconfig. - Say what a run creates: without --full, only the DNS probe pod. - Clear the last run's JSON report as well as its JUnit one. - Write the container kubeconfig to a new owner-only file. - Refuse a git describe tag that is not a Docker tag. - Read only this run's part of connect.log, and keep tsh's kubeconfig in --out. - Refuse a kubeconfig whose token comes from a file. - Keep a kept tenant's kubeconfig at 0600 when the file already existed. - Drop the FORGE_TELEPORT_PROXY fallback; set TELEPORT_PROXY or tsh login. - Use nvke-controller and registry as example names in tests and docs. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): address review findings on validation profiles Skip the profile tests that read the package's source when the binary runs without it, as the e2e images do. Refuse duplicate API server flag names and component keys. Run the probe namespace removal however the teardown ends, and write a kept tenant's kubeconfig privately. Stop tsh with an interrupt and wait for it, removing its kubeconfig. Note the variable and label a v0.23.1 image reads. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(qualify): keep --only narrowing, fail empty runs in the suite, free the --run-dir port - Refuse an --only that does not parse as a label expression on its own, so it cannot close the filter's parenthesis and select the creates specs. - Fail a validation image run in which no spec passed, in the suite, so the in-cluster Job fails as qualify validate does. Dry runs are exempt. - Forward a free local port for --run-dir, with a private copy of the kept kubeconfig on that port, rather than bind the node's own port locally. - Say that apiVersion and kind are required in a profile. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): bound the probe namespace cleanup, and test writePrivateFile - Remove the tenant's probe namespace on its own one-minute context, so an AfterAll timeout, which cancels the spec's, does not leave it behind. - Test writePrivateFile on a new file and on an existing 0644 one. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): register the no-check hook before the selected JUnit report ReportAfterSuite hooks run in registration order, each on the report as it stood before it ran, so the JUnit report written first left out the no-check failure. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(qualify): require a probe namespace for scoped runs, keep credentials out of --out - Refuse a profile with managementCluster.scope: namespaces and no probe.namespace when the run is not in a pod, rather than create the probe pods in default, which the scope never named. - Write the transit kubeconfigs to a private directory under the user's cache, removed when the run ends, so --out holds no credentials. - Say in the README that the image's default runs the creates specs, the equivalent of qualify validate --full, and how to run it read-only. Signed-off-by: Ron Compos <rcompos@nvidia.com> * fix(e2e): precheck the profile in the run's namespace, and fail a CNPG check that saw no cluster The profile precheck passed no namespace file, so it always took the run to be outside a pod and refused scope: namespaces without probe.namespace even in the image. It now reads the service-account namespace file the specs read. With scope: namespaces and every CloudNativePG cluster outside the scope, the database check passed having checked none. It now fails, while a site with no database cluster still passes. Signed-off-by: Ron Compos <rcompos@nvidia.com> --------- Signed-off-by: Ron Compos <rcompos@nvidia.com> |
||
|
|
391e23be2f |
test(e2e): report AICR's section 5 findings (#2571)
The register's section 5 entries leave a workload cluster's workloads to its customer. On the qualification tenant NVIDIA chose every workload, so the scan after the GPU runtime install now judges section 5's audited checks without the register. The manual ones stay excepted: kube-bench reports them without looking at the cluster. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
ec0bb7b149 |
fix(controller): keep SPIRE host entries while their node has a record (#2587)
The orphan sweep and the sibling cleanup kept an entry only while a Machine carried its host ID. An adopted control-plane node has a node record and no Machine, so the operator's labelled entry for it was deleted after an hour. Make the NVKE node record the source of truth: an entry is live while the node its SPIFFE ID names has a record, and the sibling cleanup also drops a record that is being deleted. Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com> |
||
|
|
a318b22230 |
fix(agent): require an explicit CNI plugin instead of defaulting to OVN (#2564)
The agent no longer defaults an unspecified CNI to OVN. `KubeadmInit` refuses an empty or unknown `cni_plugin_name` when it would install a CNI itself, and `InstallCNI` refuses `CNI_VARIANT_UNSPECIFIED`. |
||
|
|
6ea7dc33d1 |
feat(e2e): perf tenant with 20 workers (#2586)
Each perf stream run builds a tenant of three control-plane nodes, two monitoring nodes and 50 workers, so it asks the site for 55 machines at once. Concurrent creates near this size have not reliably come up on the perf stream's site.
This change gives the perf tenant 20 workers and keeps its three control-plane nodes and two monitoring nodes, so the tenant has 25 nodes. Why a node fails to boot is unchanged by this PR; it only lowers how many machines the stream asks for at once. Every other stream keeps its shape and its timeouts.
### What changes
- Perf stream in `release/policy.yaml` sets `tenantWorkers: 20`, down from 50, and its comment says 20 workers.
- Tenant create wait and readiness wait follow the node count: 45 minutes up to ten nodes, then one more minute per node. At 25 nodes each is 60 minutes, down from 90, and the stream's comment says so.
- Suite timeout stays at 400 minutes, and the kaps-bench run spec windows stay at 45 and 30 minutes.
- A run needs 26 free machines on the perf site, down from 56: the site node and the 25 tenant nodes.
- Perf row in `docs/qualification/hardware-qualification.md` says 20 workers.
- `TestTenantProvisionTimeout` checks the perf shape at 25 nodes and 60 minutes in place of 55 nodes and 90 minutes.
### Tested
Run on this branch (base
|
||
|
|
a3cd922847 |
feat(controller): support cniPlugin none to create a cluster with no CNI (#2551)
Adds the `none` CNI plugin: a cluster created with `cniPlugin: none` is provisioned with no CNI and no kube-proxy, for users who bring their own CNI. This covers the controller end to end: the API enum and validation, the init path, DNS and the node user-data. nvkectl and docs are not part of this PR. A `none` cluster's nodes stay NotReady until the user installs a CNI, so day-2 controllers that wait on `KubernetesReady` (remediation, scale-down quorum accounting, cert renewal) hold off until then. That is unchanged here. |
||
|
|
8150df8f7c |
build(deps): pin klauspost/compress 1.20.5 and brotli 1.3.0 (#2567)
Signed-off-by: Byron McAdams <bmcadams@nvidia.com> |
||
|
|
4eb5a32cec |
fix(controller): let a control-plane node that can't join be deleted (#2556)
* fix(controller): let a queued delete of a stuck control-plane node start its teardown selectControlPlaneJoin skips a node with an accepted delete unless its join is already in flight, so a node that keeps failing to join no longer blocks its own delete. Teardown of a control-plane node that reached ReadyToJoin but never joined now waits, best effort, for the agent to stop reporting a pending kubeadm join before it removes the etcd member. The wait is capped at 30 minutes, ends after 2 minutes if the agent is unreachable, and is guarded by workflow.GetVersion. Related: #2387 Signed-off-by: Carl Danley <cdanley@nvidia.com> * fix(controller): keep the kubeadm join wait inside its limits End each agent status call when the agent would count as unreachable or the wait runs out, whichever is first, so a call that hangs after a run of refusals no longer extends the 2-minute window. Use a schedule-to-close timeout for the wait activity, so a retry after a lost worker doesn't start a fresh 30-minute cap. Signed-off-by: Carl Danley <cdanley@nvidia.com> --------- Signed-off-by: Carl Danley <cdanley@nvidia.com> |
||
|
|
00d375a743 |
fix(agent): wait for kube-apiserver to reload its authentication config (#2542)
* fix(agent): wait for kube-apiserver to reload its authentication config PatchAPIServerManifest can replace the authentication configuration of a running kube-apiserver by writing only the file. kube-apiserver then reloads the file by itself: it builds the new authenticators, checks their health every 10 seconds and puts them in use once they are healthy. The agent waited only for /readyz, which answers 200 before, during and after the reload. So the call returned before the new configuration was in use. Enabling OIDC on an existing cluster takes this path. On a cluster with three control plane nodes and Kubernetes 1.36, each kube-apiserver logged "reloaded authentication config" 9.97 to 9.99 seconds after the agent wrote the file. The enablement returned 9.6 seconds before the kube-apiserver of the last node had loaded the file, and a client with a SPIRE token got "Unauthorized" from it for the next 9 seconds. The tree of that run did not have the control plane endpoint health gate yet, which drains a node before the patch. After a files-only change that writes the file that --authentication-config names, the agent now waits until the local kube-apiserver reports the hash of the written content in apiserver_authentication_config_controller_last_config_info. kube-apiserver sets that hash after it has put the new authenticators in use, so the agent compares no clocks. The wait ends after two minutes at the latest. The agent then restores the file and reports FAILED_RESTORED. When kube-apiserver counted failed reloads in that time, the message says that it rejected the file. Until now such a rejection was silent: the call reported success and kube-apiserver kept its old configuration. The agent reads the state of kube-apiserver before it writes the file. When it cannot read the metrics, or kube-apiserver does not publish the hash (Kubernetes before 1.34), it logs that and waits only for /readyz, as before. A change of the manifest is not affected: kube-apiserver restarts there and reads the file at its start. With this change, on a tree with the health gate, two runs of the same enablement: the agent waited 10.7 to 11.1 seconds on each node, the enablement returned after the last kube-apiserver had loaded the file, and a probe with a SPIRE token got no "Unauthorized" in 45 calls to each kube-apiserver. No kube-apiserver restarted. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs(agent): describe the wait for the authentication config reload PatchAPIServerManifest now waits until kube-apiserver has loaded an authentication configuration that the agent rewrote without a restart. Say so where the design page describes how the call is verified. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs(agent): say when the authentication config reload is not confirmed The design page said that the agent waits until kube-apiserver has loaded a rewritten authentication configuration, and that it restores the file if kube-apiserver does not. That is true only when the agent could read the loaded hash from the metrics of kube-apiserver before the write. When that read fails, also on Kubernetes 1.34 and later, the agent logs a warning and waits for /readyz alone, and the call can return OUTCOME_APPLIED before kube-apiserver has loaded the content. Say so, with the text of the warning. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(agent): confirm the old authentication config after a restore When PatchAPIServerManifest gives up on a files-only change, it writes the old files back and waits for /readyz. If kube-apiserver had loaded a staged authentication configuration, that rollback starts another reload. The reload takes about 10 seconds, the staged authenticators stay in use until it ends, and /readyz answers 200 all the time. So the call could return OUTCOME_FAILED_RESTORED while the node was not yet back in its state from before the call. After the rollback the agent now waits until the local kube-apiserver reports again the hash that it had loaded before the write. The agent already reads that hash before it writes the file. If kube-apiserver never loaded the staged content, it still reports that hash and the wait ends with the first read. The wait has the same limit of two minutes as the wait for the staged content. When the limit passes, the call returns OUTCOME_FAILED_NOT_RESTORED, and the message says that kube-apiserver did not return to its previous authentication configuration. The wait is for the hash from before the write and not for the hash of the restored file. The two are the same when kube-apiserver had loaded the file that was on the node. The first is also right when it had not, and when the call created the file. When the agent could not read the hash before the write, the restore waits only for /readyz, as before. A files-only change can now take 440 seconds in the worst case: two minutes and 100 seconds for the change, and the same for the restore. The NVKE controller gives the call 8 minutes. One case stays open. A reload of the staged content that kube-apiserver started before the rollback can end after the call has returned. kube-apiserver then loads the restored file again by itself. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs(controller): correct the worst case of the node agent call in a comment The comment on WithRolloutNodeAgentApplyOptions says that the node agent call takes about 400 seconds in the worst case. A files-only change of the authentication config now also waits for kube-apiserver to load the file, for up to two minutes after the write and for up to two minutes after a restore. Its worst case is 440 seconds: two minutes and 100 seconds for the change, and the same for the restore. The activity deadline of 8 minutes still covers that. Only the comment changes. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(controller): give the node agent call 10 minutes The activity that calls PatchAPIServerManifest had a deadline of 8 minutes, and its comment said that the call takes about 440 seconds in the worst case. That count took a readiness wait as 100 seconds. A readiness wait is up to 11 probes of /readyz of at most 3 seconds each, with 10 sleeps of 10 seconds between them: 133 seconds. A files-only change of the authentication config can take 536 seconds: up to 30 seconds for the read of the metrics before the write, 120 seconds for the reload and 133 seconds for readiness, then 120 and 133 seconds again for a restore. That is more than the 480 seconds of the deadline. A manifest change can take 466 seconds plus its reads of the mirror pod, which have no time limit of their own. Raise StartToCloseTimeout to 10 minutes. ScheduleToCloseTimeout and HeartbeatTimeout stay as they are. Correct the numbers in the comment of the activity options, and in the comment of the reload limit in the agent. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(agent): accept the restored file after a rollback After a rollback of the authentication config, the agent waited until kube-apiserver reported the hash that it had loaded before the write. That hash is not always the hash of the file on the node. When kube-apiserver had another config loaded than that file, and then loaded the staged content, the rollback writes the file of the node back and kube-apiserver loads it. The hash from before the write does not come back. The wait ran to its limit of two minutes, and the call reported OUTCOME_FAILED_NOT_RESTORED for a node that no longer used the staged content. The wait now also ends with success when kube-apiserver reports the hash of the file that the rollback wrote back. The agent computes that hash before the write, from the content that the write replaces, in the same way as the hash of the staged content. When the call created the file, the rollback removes it, and only the hash from before the write counts, as before. The design page now names the two hashes that the wait accepts. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
47170e87f6 |
fix(kubeadmconfig): pass CIS 4.2.12 on the kubelet (#2552)
kube-bench's CIS 4.2.12 check compares the kubelet's tlsCipherSuites with an allowlist that spells the two ChaCha20 suites without their _SHA256 suffix. Every node therefore warned on suites the check means to allow, and the exception register carried an entry for it. Name the two suites the way the check does. The kubelet parses its configured list with k8s.io/component-base/cli/flag, which maps both spellings to the same suite, so it accepts exactly the suites it did. A new test parses the list that way to hold that, and checks the names against kube-bench v0.17.0's 4.2.12 allowlist. The API server's list keeps the _SHA256 names, which its own check, 1.2.29, accepts. With every node passing, the 4.2.12 register entry goes. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
28a8010cab |
chore(os-image): drop Kubernetes 1.34.2 after staging 1.37 (#2276)
Signed-off-by: Payal Patel <payapatel@nvidia.com> |
||
|
|
1a46559dd6 |
docs: say which published NVKE artifacts are private (#2531)
Signed-off-by: Nathan Hensley <nhensley@nvidia.com> |
||
|
|
ed0282a944 |
test(e2e): scan with kube-bench v0.17.0 and cis-2.0 (#2562)
kube-bench v0.17.0 ships cis-2.0, its configuration for the CIS Kubernetes Benchmark 2.0. Pin the release by its multi-arch index digest and select cis-2.0. Like the release before it, v0.17.0 maps Kubernetes versions only up to 1.35, so the scan keeps naming the benchmark. cis-2.0's checks are the ones the scans already ran: the same 131 check IDs, titles, audits and tests, with only remediation text changed. CIS 2.0.0 edited recommendations without adding, removing or renumbering any, so the register keeps its entries; the 4.2.12 reason now names cis-2.0, whose cipher allowlist is unchanged. kube-bench's job.yaml changed only its image tag, so the scan pods mount the same host paths. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
7042b30115 |
feat(e2e): perf tenant with 3 control planes, 2 monitoring, 50 workers (#2524)
## Summary
Each perf stream run now builds a tenant with three control-plane nodes, two monitoring nodes and 50 workers, up from one, one and three. A stream picks its control-plane count with a new parameter, and on Forge the site gives those nodes one shared address. Tenant waits grow with the node count, and the perf stream's time limit goes from 260 to 400 minutes. A stream that leaves the parameter unset keeps one control-plane node, so every other stream keeps its shape and its limits.
## Motivation / Context
Every perf run today measures a tenant with a single control-plane node, so no perf run covers a highly available tenant, where several control-plane nodes share one address. That address is the control-plane VIP, and the suite's Forge path never sent one.
kaps-bench also sizes its load from the worker count: cluster-density-v2 runs nine iterations per worker, so three workers give it 27 iterations and 50 give it 450.
Closes: N/A
Related: https://github.com/dsx-ai-factory/nvke/issues/2089
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Build/CI/tooling
## Component(s) Affected
- [ ] Controller (`controller/`)
- [ ] REST API (`controller/api/openapi.yaml`)
- [ ] Node agent or updater (`agent/`)
- [ ] gRPC API (`agent/pkg/agent/proto/`)
- [ ] nvkectl CLI (`cli/`)
- [ ] Cluster API provider (`cluster-api-provider-provisioned/`)
- [ ] Helm charts or deployment (`controller/deploy/`)
- [ ] NVKE telemetry pipeline (NKTP) integration (`deploy/nico/nktp/`)
- [ ] nico-sim (`controller/nico-sim/`)
- [ ] OS image or image checker (`os-image/`)
- [x] CI / workflows (`.github/`)
- [x] Docs / examples
- [x] Other: the e2e suite (`controller/test/e2e/`), the release planner and the release policy (`release/`)
## Implementation Notes
### Control-plane count and VIP
- `tenantControlPlaneNodes` joins `tenantWorkers` and `monitoringWorkers` in the stream parameters (`release/pkg/qualification/policy.go`). A negative value fails validation, and zero or unset means one.
- `release/hack/qualify-e2e.sh` carries it to the suite as `-e2e.tenant-control-plane-nodes`, the same way `monitoringWorkers` travels, and the qualify summary prints it.
- `forge-perf.yaml` reads the site's `controlPlaneVIP` from `FORGE_PERF_CONTROL_PLANE_VIP`, empty for none, and `qualify-e2e.yml` passes that variable from the GitHub environment and lists it and the count in its resolved-inputs table.
- On Forge the tenant gets the requested count, and the site VIP only when it has more than one control-plane node. An entry that names its own VIP keeps it. A full-stage run that asks for more than one control-plane node with no VIP stops before any machine is taken, and so does a count below one. Its capacity check counts every control-plane node.
- Only the Forge tenant applies the count. A full-stage run on another provider that asks for more than one control-plane node stops before any machine is taken.
### Perf stream shape
- `release/policy.yaml`: the perf stream sets `tenantControlPlaneNodes: 3`, `monitoringWorkers: 2` and `tenantWorkers: 50`. Its `suiteTimeoutMinutes` goes from 260 to 400.
- `tenantProvisionTimeout` gives 45 minutes up to ten tenant nodes and one more minute for each node above that, so 55 nodes get 90. Two waits use it, the tenant create wait and the readiness check, so neither cuts the other short. Each goes from 45 to 90 minutes for this stream.
- `tenantProvisionTimeout` is computed when the spec tree is built, after flags are parsed, so the nico-forge lane and the qualify site lane both get it. Simulator lanes keep their own create budgets, and their readiness timeout stays 45 minutes at default flags.
- Why 400 minutes: take a site build and checks of about 34 minutes (about 30 on our az41 run), then let the two waits, kaps-bench and the delete each use their full limit: 90 and 90, 75, and 75. With about 25 minutes of site cleanup that is 389. With a shorter limit the suite deadline could fire during the delete and leave machines allocated.
- kaps-bench keeps its time window per run spec. cluster-density-v2 has not run at 450 iterations yet, so the first full-size run shows whether its 30 minutes are enough.
- One policy test now expects two monitoring nodes on the perf stream. Both READMEs (e2e and release) and the two qualification docs describe the parameter, the VIP variable and the new tenant.
## Testing
Run on this branch (base
|
||
|
|
643e5eb773 |
feat(os-image): restore optional verified IMDS agent packaging (#2419)
Signed-off-by: Nathan Hensley <nhensley@nvidia.com> |
||
|
|
9b8b884bae |
build: bump the go-dependencies group across 1 directory with 6 updates (#2541)
* build: bump the go-dependencies group across 1 directory with 6 updates Bumps the go-dependencies group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/spiffe/go-spiffe/v2](https://github.com/spiffe/go-spiffe) | `2.9.0` | `2.10.0` | | [github.com/cedar-policy/cedar-go](https://github.com/cedar-policy/cedar-go) | `1.9.3` | `1.9.4` | | [github.com/gravitational/trace](https://github.com/gravitational/trace) | `1.5.4` | `1.6.0` | | [go.temporal.io/sdk](https://github.com/temporalio/sdk-go) | `1.51.0` | `1.52.0` | | [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) | `1.71.0` | `1.71.1` | | [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.316.0` | `0.317.0` | Updates `github.com/spiffe/go-spiffe/v2` from 2.9.0 to 2.10.0 - [Release notes](https://github.com/spiffe/go-spiffe/releases) - [Changelog](https://github.com/spiffe/go-spiffe/blob/main/CHANGELOG.md) - [Commits](https://github.com/spiffe/go-spiffe/compare/v2.9.0...v2.10.0) Updates `github.com/cedar-policy/cedar-go` from 1.9.3 to 1.9.4 - [Release notes](https://github.com/cedar-policy/cedar-go/releases) - [Commits](https://github.com/cedar-policy/cedar-go/compare/v1.9.3...v1.9.4) Updates `github.com/gravitational/trace` from 1.5.4 to 1.6.0 - [Release notes](https://github.com/gravitational/trace/releases) - [Commits](https://github.com/gravitational/trace/compare/v1.5.4...v1.6.0) Updates `go.temporal.io/sdk` from 1.51.0 to 1.52.0 - [Release notes](https://github.com/temporalio/sdk-go/releases) - [Changelog](https://github.com/temporalio/sdk-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/temporalio/sdk-go/compare/v1.51.0...v1.52.0) Updates `cloud.google.com/go/storage` from 1.71.0 to 1.71.1 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/compute/v1.71.0...storage/v1.71.1) Updates `google.golang.org/api` from 0.316.0 to 0.317.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.316.0...v0.317.0) --- updated-dependencies: - dependency-name: github.com/spiffe/go-spiffe/v2 dependency-version: 2.10.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.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/gravitational/trace dependency-version: 1.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.temporal.io/sdk dependency-version: 1.52.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: cloud.google.com/go/storage dependency-version: 1.71.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: google.golang.org/api dependency-version: 0.317.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * fix(deps): hold gravitational/trace at v1.5.4 and regenerate notices trace v1.6.0 removed TraceErr.Traces, which the pinned teleport/api still uses, breaking every controller build. Also refresh go.work.sum and THIRD_PARTY_NOTICES.md for the remaining bumps. 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> |
||
|
|
3fe591ee78 |
test(controller): refresh the CAPNICo CRD fixture for v0.2.0 (#2539)
Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
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> |
||
|
|
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> |
||
|
|
ce02d7290b |
fix(deps): bump github.com/google/cel-go to v0.30.0 (#2533)
v0.29.2 is affected by GO-2026-6094 (JSON private fields exposed via NativeTypes and ParseStructTag in cel-go/ext), fixed in v0.30.0. govulncheck reports the package as imported but not called (code scanning alert 1181); bump to clear it. Bumped in controller, controller/k8s-apis and management-engine; make work-sync updated cli/go.sum. Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
4f76e810d7 | test(e2e): report a CIS scan after the GPU runtime install (#2438) | ||
|
|
407218a442 |
feat(controller): adopt the cluster the NVKE controller runs (#2415)
* feat(controller): adopt the cluster the controller runs on behind a flag
Add POST /clusters/self-adopt, which records the cluster the controller runs
on as a cluster NVKE manages, without running kubeadm init. The endpoint is
served only when clusterSelfAdoptionEnabled is set in nvke-controller-config
(chart value clusterSelfAdoptionEnabled, default false). Otherwise it answers
400.
The controller reads the cluster with its own service account: the
control-plane Nodes, each with an InternalIP, and the Kubernetes version and
pod and service CIDRs from kube-system/kubeadm-config. The request carries
only what NVKE cannot read: name, NICo site and VPC (orgID optional), CNI
plugin and version, and etcdEncrypted. While the flag is on, the chart grants
that service account list on Nodes and get on kube-system/kubeadm-config.
Self-adopt returns 400 for no control-plane node, a node without an
InternalIP, a kubelet that differs from kubeadm-config, a version that is not
X.Y.Z, no or unsupported pod or service CIDRs, a second adoption, or an
existing Cluster API Cluster of the same name.
The adopted control plane stays with its operator, outside NVKE. Adoption
marks the cluster and its control-plane nodes as adopted, records desiredCount
as their number with no control-plane machine settings, and turns off
recycling, automatic scale-down and rebalancing:
- PATCH /clusters/{id} refuses turning those back on, controlPlaneConfig.nico,
controlPlaneKubernetesVersion, any desiredCount change and any control-plane
rollout field.
- DELETE /nodes/{id} on an adopted node returns 409, refused in the handler.
- The node-status sync never marks an adopted node for recycling, so
control-plane remediation never replaces it.
DELETE /clusters/{id} on an adopted cluster removes only NVKE's records and
leaves the cluster running. It returns 409 while the cluster has node pools,
so their workers are drained and released through the node pool delete first.
TeardownCluster then deletes the Cluster API Cluster and NicoCluster and the
adopted node and cluster rows, and never tears down a node.
An adopted cluster gets OIDCAuthEnabled false, since NVKE cannot configure its
API servers. Its provisioning workflow applies only the Cluster API scaffold:
node-local DNS and the Pod Security namespace labels stay with the operator.
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
* fix(controller): keep maintenance off an adopted cluster and serialize self-adopt
Address review on the self-adopt change.
Keep NVKE from changing an adopted control plane in place:
- PATCH /clusters/{id} refuses turning on enableEtcdEncryption or enableOidc
for an adopted cluster, alongside the existing control-plane refusals.
- Scheduled certificate renewal skips an adopted cluster.
- stableControlPlane refuses an adopted control plane, which keeps on-demand
certificate renewal and etcd key rotation off it.
Make "adopts at most one cluster" hold across concurrent requests:
SelfAdoptCluster takes a transaction-scoped advisory lock (LockSelfAdoption)
and checks for an adopted cluster again inside the transaction that records
it, so a second adoption gets a 400. Also fix a stale comment that said an
adopted record cannot be deleted.
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
---------
Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com>
|
||
|
|
2e7cfb59c0 |
docs(controller): document and pin that custom CIDRs require an explicit CNI plugin (#2526)
* test: pin that an empty CNI plugin has no default version Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> * fix(controller): accept custom CIDRs when the CNI plugin is omitted An omitted cniPlugin is stored as ovn-kubernetes, but the CIDR check saw the raw empty value and required ovn-kubernetes by name. Check the effective plugin instead. Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> * docs(controller): document that custom CIDRs require an explicit CNI plugin Revert the effective-plugin check so an omitted cniPlugin keeps being refused custom CIDRs, state the rule in the OpenAPI descriptions, and pin it with a handler row for each side. Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> * fix(management-engine): tidy go.mod for cedar-go v1.9.3 Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> --------- Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> |
||
|
|
f91b3e1b24 |
feat(agent): add a control plane endpoint health gate (#2514)
* feat(agent): add a control plane endpoint health gate The agent can take a control plane node out of the cluster endpoint before an operation, but only when the node runs kube-vip. A node behind a load balancer that it does not run has no kube-vip, so the withdrawal did nothing there. Connections through the load balancer stayed on the node while its API server or its etcd restarted, and worker kubelets on those connections went NotReady. Add a second way to withdraw a node, a health gate. The gate is a file, and the health check of the load balancer has to fail while the file exists. NodeAgentServer.ControlPlaneEndpointGate configures it. The zero value means no gate, and the agent then behaves as before. No flag sets the field yet. withdrawKubeVipLocked closes the gate first. It reads the IPv4 address of the backend interface, writes the gate file, waits the settle time, closes the established sockets of remote clients on that address and port 6443 with the existing ss -K code, and runs the existing quiet window check on that address. A failed check fails the withdrawal. restoreKubeVipLocked opens the gate after kube-vip is back. So StartKubeVipRestore opens the gate, and the etcd defragmentation gets the gate through the two calls that it already makes. A node with kube-vip and a gate leaves both, and returns to both. The gate file names the park directory of the flow that closed it. The directory decides who opens the gate, as it decides who restores a parked manifest. A caller's restore opens each gate. The etcd defragmentation opens only a gate that it closed, and it leaves a gate that a caller closed as it is. The backend interface must have one global IPv4 address. IPv6 is not handled, as for kube-vip. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(agent): open or hand off a gate that an etcd defrag left closed The etcd defragmentation closes the control plane endpoint gate and opens it in the same call. Two cases left the gate closed with nobody to open it. The agent can stop in the middle of a defragmentation. The repair of stale state at startup now opens a gate that names the park directory of the defragmentation, after it has put the parked manifests back. A gate that a caller closed names another directory and stays closed. The defragmentation can leave the node out of service on purpose, when etcd does not come back healthy. It then hands the parked manifests to the caller. It now hands the gate over with them, so the next start of the agent does not open the gate, and StartKubeVipRestore does. The tests of the defragmentation with a gate are in this commit, because one of their cases is the hand-off. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(agent): add the control plane endpoint gate flags Three flags configure the control plane endpoint gate: --control-plane-endpoint-gate-file path of the gate file --control-plane-endpoint-backend-interface interface on which the connections of the load balancer arrive --control-plane-endpoint-gate-settle settle time, default 10s With no gate file the agent has no gate. The agent does not start with a gate file and no backend interface, with a backend interface and no gate file, with a relative gate file path, or with a negative settle time. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs(agent): describe the control plane endpoint gate The agent README lists the three flags, and says what the deployment has to provide and who opens a closed gate. Two pages were wrong with the gate. The agent design page said that the graceful shutdown and StartKubeVipRestore handle only kube-vip. The certificate renewal page said that a node without kube-vip skips the drain. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * feat(agent): close the control plane endpoint gate around kubeadm upgrade apply KubeadmUpgradeApply runs kubeadm upgrade apply, which restarts etcd and the API server of the node. The control plane endpoint gate did not cover this call. The load balancer took the node out only after its health check had failed, and in that time it still sent calls to an API server that could not answer them. With a gate, the call now takes the node out of the load balancer after kubeadm upgrade plan and before kubeadm upgrade apply, in the way the graceful shutdown does it. It opens the gate when kubeadm returns, also when kubeadm fails. A node that cannot leave the load balancer does not start the apply, and the call fails. The call parks no manifest, so the gate file names the call and not a park directory. A gate with that name is one that the agent opens, as it opens a gate of the etcd defragmentation. The repair of stale state at startup therefore opens it too, when the agent stopped in the middle of the call. The gate stays open on a cluster with one control plane node, which the agent reads as one voting member of etcd. kubeadm reaches the cluster through the load balancer, so with the only node out of it the apply would fail. The gate also stays open when the members cannot be listed. The call holds the lock of the static pod changes from the close to the open. A second call, which a caller sends when the first one takes too long, then waits and does not open the gate under the first. The call has no operation record, so it logs its gate steps as the repair at startup does. The log line of those steps no longer names the repair: it is now "control plane step outside an operation". With no gate file the call runs the same two commands as before and nothing else. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs(agent): describe the gate of kubeadm upgrade apply The agent README says when KubeadmUpgradeApply closes and opens the control plane endpoint gate, that the call does not withdraw kube-vip, and why the gate stays open on a cluster with one control plane node. The list of gate file contents has the name that this call writes. The README also says that the other calls that restart the API server do not touch the gate, and that their caller closes and opens it. The agent design page names the call next to the graceful shutdown. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(agent): reject a directory as the control plane endpoint gate file The agent accepted a gate file path that is an existing directory. It started, and each later withdrawal failed: the agent renames the gate file into place, and a rename cannot replace a directory. An operation of the agent that reads the gate first failed at the read. The check of the gate flags now rejects such a path at startup, like the other gate settings that cannot work. A path with no file is still accepted. No file is the open gate, so the file is absent at each normal start. The test of the gate flags has a case for an existing directory and a case for an absent file in an existing directory. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(agent): stage the control plane endpoint gate file under a private name The agent staged the gate file at the gate path plus ".tmp" and wrote it with os.WriteFile, which follows a symbolic link. The agent runs as root. A user who can write to the folder of the gate could leave a link at that name. The agent then wrote the owner of the gate into the file that the link names, and the rename put the link at the gate path. The gate file now goes through atomicWriteFile, as the other files of this package that are renamed into place. That helper creates the staged file itself, with a name that nobody knows before, writes through the open file and removes it when a step fails. The rename replaces a link at the gate path and does not follow it. The gate no longer uses the FileWriter of the server. The tests fail the write through a function of the server that stands in for the helper. Startup does not refuse a folder that another user can write to. The folder often does not exist before the first close, and its mode does not say enough on a node image that has the folder on a mounted volume. The README now names such a folder as a thing the deployment has to provide. A new test puts a link at the old staging name and at the gate path. It checks that the file behind the link is unchanged and that the gate file is a regular file with mode 0644. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(agent): keep parked manifests with the gate when its hand-off fails A defragmentation that gives up on its etcd member hands the gate and the parked manifests to the caller. The hand-off recorded a failure of the gate and still moved the manifests. The gate file then named the defragmentation, and the caller held the manifests. At its next start the agent opened that gate, because the gate file named a flow of the agent, while kube-apiserver was still parked for the caller. The hand-off now does the gate first and stops when the gate fails. No manifest moves. The gate and the manifests all stay with the defragmentation, and the defragmentation reports the failure as before. At its next start the agent puts the manifests back and then opens the gate, as it does for a defragmentation that was interrupted. A new test runs a defragmentation whose member does not return and whose gate file cannot be written again. It checks that the gate and kube-apiserver stay with the defragmentation, and that the next start puts kube-apiserver back and opens the gate. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(agent): list the etcd members of kubeadm upgrade apply under the lock With a gate, KubeadmUpgradeApply listed the members of etcd before it took the lock of the static pod changes. When the list failed, it ran kubeadm upgrade apply with no lock. The apply of a first call restarts the local etcd. A second call, which a caller sends when the first one takes too long, could then fail its list and run a second kubeadm upgrade apply next to the first. The call now takes the lock before it lists the members. A second call waits for the first, and lists the members when the first apply is over. The apply on a cluster with one control plane node and the apply with members that cannot be listed still leave the gate open, and they now run under the lock too. With no gate file the call takes no lock, as before. The helpers that run under the lock do not take it themselves, and the defragmentation already lists the members under the same lock. A new test holds a first call in its apply, fails the member list and sends a second call. It checks that the second apply does not start while the first one runs. The cases for one control plane node and for a failed member list now expect the lock during the apply. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * docs(agent): say what kubeadm upgrade apply does with a gate that exists The agent README and the agent design page said that KubeadmUpgradeApply removes the gate file when kubeadm returns, and that the gate stays open with one control plane node or with members that cannot be listed. Both say more than the code does. The call removes only a gate file that it wrote. A gate that a caller closed stays closed until the caller opens it with StartKubeVipRestore, and the call then closes no connection. With one voting member of etcd, or with members that it cannot list, the call does not use the gate. It creates no gate file and leaves one that exists as it is. The two pages now say this. The cases of the upgrade test for a gate of a caller, for one control plane node and for a failed member list show the same behavior. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(agent): reject a gate file path that names a directory by its form Startup refused a gate file that is an existing directory. A path that ends with a separator, or whose last element is "." or "..", passed that check while nothing existed there. At the first close of the gate the agent creates the folder of the gate file, which for such a path is the gate path itself. The rename of the staged file then fails, and a directory stays at the gate path. Startup now refuses such a path with the same message. A path of an absent file with no such ending still passes. Three new cases of TestControlPlaneEndpointGateFlags have a path that ends with a separator, with "/." and with "/..". They fail without the new check. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
912b6f1cd8 |
test: pin how the agent and controller handle each CNI plugin (#2469)
The CNI plugin a cluster is created with decides who installs the CNI, which packages a node boots with, and whether kubeadm installs kube-proxy. Most of that was untested, so these tests pin what it does today. Nothing in production code changes, and all of them pass on main. - agent: kubeadm init installs a CNI only when neither no_cni_install nor the deprecated skip_cni_plugin_install is set, and reports no CNI status when it skips. - db: the plugin and version defaults, and the plugins the API accepts. - activities: KubeadmInit sends no_cni_install only when the CNI is installed afterwards, sends the legacy CNI fields and registry for OVN-Kubernetes and Calico, skips kube-proxy for OVN-Kubernetes only, and refuses a plugin it does not know. - workflow: the real CNIInstallMode decides whether InstallCNI runs, and a plugin with no post-init install never reaches it. - user-data: every template the repository ships renders for each plugin and names only that plugin's packages, a template that guards its CNI install installs only for the enabled plugin, and an unknown plugin is refused. - server: a cluster is stored with the plugin and version it was asked for, with ovn-kubernetes and the plugin's default filling what is omitted. Each test was checked by breaking the behaviour it pins and confirming it fails. Signed-off-by: Jyoti Mahapatra <jyotim@nvidia.com> |
||
|
|
0e5a9f1182 |
build(deps): bump ARG-pinned base image digests (#2426)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
50dca8f8ee |
fix(nico-sim): wait for systemd before simulated cloud-init commands (#2511)
* fix(nico-sim): wait for systemd before simulated cloud-init commands The container backend started the runcmd commands of the cloud-init data right after docker start. docker start returns before systemd in the node container is up. A systemctl call in runcmd then failed with "Failed to connect to system scope bus via local transport", the runner wrote error to the status file, and nothing runs the commands again. NVKE adds a systemctl restart of the agent unit as the last command of every node, so NodePreflight failed on check_cloud_init_status without end. In a test on a fast host, systemd was not up when the commands started in three of four starts. A real node cannot lose it, because cloud-init runs runcmd from a systemd unit. Wait for the control socket of systemd, /run/systemd/private, before the runner starts. systemctl run as root connects to that socket. The limit is 60 seconds. When it passes, the create fails with an error that names the container and the socket, the container is removed as for each other failed create, and the caller can create the instance again. A docker exec that fails ends the wait at once. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(nico-sim): read the systemd probe answer from stdout only The wait for systemd runs a probe in the node container and compares the output with the text "ready". The probe went through runDocker, which returns stdout and stderr as one text. A warning on stderr from Docker or from the exec then made the output differ from "ready" on each check. The wait ended at its limit and the create failed for a container whose systemd was up. Add runDockerStdout next to runDocker. It returns only what the command wrote to stdout. When the command fails, its error holds what the command wrote to stderr, so the cause of a failed probe stays in the error. The probe now uses it. runDocker keeps the combined output, so each other caller gets what it got before. Both helpers build their error in the new dockerError, which holds the lines that were in runDocker. The error of a failed probe no longer has the words "exec in container", because the Docker command line after them says the same. A new case of TestUnit_ApplyCloudConfig_WaitsForSystemd has the fake Docker print "ready" on stdout and a warning on stderr. It failed with the timeout error before this change and passes now. The case for a failed check now also requires the stderr text in the error. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * refactor(nico-sim): state the reason of the systemd wait one time The reason of the wait was in four places: a comment at the call, the doc comment of waitForSystemd, a paragraph of the README and the header of the test. The doc comment now has it. Step 3 of the cloud-init list in the README has the wait and what occurs at a timeout, and the paragraph after the list is removed. The time between two probes is now the constant systemdReadyInterval, next to statusUpdateTimeout. No test needs a different value, so the Service field of that name is removed. systemdReadyTimeout is the one value that tests set. The simulator behaves as before. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
03307407a0 |
build: bump the go-dependencies group across 6 directories with 8 updates (#2445)
* build: bump the go-dependencies group across 6 directories with 8 updates Bumps the go-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [go.etcd.io/etcd/api/v3](https://github.com/etcd-io/etcd) | `3.7.3` | `3.7.4` | | [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd) | `3.7.3` | `3.7.4` | | [github.com/cedar-policy/cedar-go](https://github.com/cedar-policy/cedar-go) | `1.9.2` | `1.9.3` | | [github.com/dsx-ai-factory/cluster-api-provider-nico](https://github.com/dsx-ai-factory/cluster-api-provider-nico) | `0.1.0` | `0.2.0` | | [go.temporal.io/sdk/contrib/opentelemetry](https://github.com/temporalio/sdk-go) | `0.8.1` | `0.9.0` | | [golang.org/x/tools](https://github.com/golang/tools) | `0.52.0` | `0.53.0` | | [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) | `1.70.0` | `1.71.0` | | [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.315.0` | `0.316.0` | Bumps the go-dependencies group with 2 updates in the /agent directory: [go.etcd.io/etcd/api/v3](https://github.com/etcd-io/etcd) and [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd). Bumps the go-dependencies group with 1 update in the /auth directory: [github.com/cedar-policy/cedar-go](https://github.com/cedar-policy/cedar-go). Bumps the go-dependencies group with 2 updates in the /controller directory: [github.com/dsx-ai-factory/cluster-api-provider-nico](https://github.com/dsx-ai-factory/cluster-api-provider-nico) and [go.temporal.io/sdk/contrib/opentelemetry](https://github.com/temporalio/sdk-go). Bumps the go-dependencies group with 2 updates in the /management-engine directory: [github.com/dsx-ai-factory/cluster-api-provider-nico](https://github.com/dsx-ai-factory/cluster-api-provider-nico) and [golang.org/x/tools](https://github.com/golang/tools). Bumps the go-dependencies group with 2 updates in the /release directory: [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) and [google.golang.org/api](https://github.com/googleapis/google-api-go-client). Updates `go.etcd.io/etcd/api/v3` from 3.7.3 to 3.7.4 - [Release notes](https://github.com/etcd-io/etcd/releases) - [Commits](https://github.com/etcd-io/etcd/compare/v3.7.3...v3.7.4) Updates `go.etcd.io/etcd/client/v3` from 3.7.3 to 3.7.4 - [Release notes](https://github.com/etcd-io/etcd/releases) - [Commits](https://github.com/etcd-io/etcd/compare/v3.7.3...v3.7.4) Updates `github.com/cedar-policy/cedar-go` from 1.9.2 to 1.9.3 - [Release notes](https://github.com/cedar-policy/cedar-go/releases) - [Commits](https://github.com/cedar-policy/cedar-go/compare/v1.9.2...v1.9.3) Updates `github.com/dsx-ai-factory/cluster-api-provider-nico` from 0.1.0 to 0.2.0 - [Release notes](https://github.com/dsx-ai-factory/cluster-api-provider-nico/releases) - [Changelog](https://github.com/dsx-ai-factory/cluster-api-provider-nico/blob/main/CHANGELOG.md) - [Commits](https://github.com/dsx-ai-factory/cluster-api-provider-nico/compare/v0.1.0...v0.2.0) Updates `go.temporal.io/sdk/contrib/opentelemetry` from 0.8.1 to 0.9.0 - [Release notes](https://github.com/temporalio/sdk-go/releases) - [Changelog](https://github.com/temporalio/sdk-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/temporalio/sdk-go/compare/contrib/opentelemetry/v0.8.1...contrib/opentelemetry/v0.9.0) Updates `golang.org/x/tools` from 0.52.0 to 0.53.0 - [Release notes](https://github.com/golang/tools/releases) - [Commits](https://github.com/golang/tools/compare/v0.52.0...v0.53.0) Updates `cloud.google.com/go/storage` from 1.70.0 to 1.71.0 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/compute/v1.70.0...compute/v1.71.0) Updates `google.golang.org/api` from 0.315.0 to 0.316.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.315.0...v0.316.0) Updates `go.etcd.io/etcd/api/v3` from 3.7.3 to 3.7.4 - [Release notes](https://github.com/etcd-io/etcd/releases) - [Commits](https://github.com/etcd-io/etcd/compare/v3.7.3...v3.7.4) Updates `go.etcd.io/etcd/client/v3` from 3.7.3 to 3.7.4 - [Release notes](https://github.com/etcd-io/etcd/releases) - [Commits](https://github.com/etcd-io/etcd/compare/v3.7.3...v3.7.4) Updates `github.com/cedar-policy/cedar-go` from 1.9.2 to 1.9.3 - [Release notes](https://github.com/cedar-policy/cedar-go/releases) - [Commits](https://github.com/cedar-policy/cedar-go/compare/v1.9.2...v1.9.3) Updates `github.com/dsx-ai-factory/cluster-api-provider-nico` from 0.1.0 to 0.2.0 - [Release notes](https://github.com/dsx-ai-factory/cluster-api-provider-nico/releases) - [Changelog](https://github.com/dsx-ai-factory/cluster-api-provider-nico/blob/main/CHANGELOG.md) - [Commits](https://github.com/dsx-ai-factory/cluster-api-provider-nico/compare/v0.1.0...v0.2.0) Updates `go.temporal.io/sdk/contrib/opentelemetry` from 0.8.1 to 0.9.0 - [Release notes](https://github.com/temporalio/sdk-go/releases) - [Changelog](https://github.com/temporalio/sdk-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/temporalio/sdk-go/compare/contrib/opentelemetry/v0.8.1...contrib/opentelemetry/v0.9.0) Updates `github.com/dsx-ai-factory/cluster-api-provider-nico` from 0.1.0 to 0.2.0 - [Release notes](https://github.com/dsx-ai-factory/cluster-api-provider-nico/releases) - [Changelog](https://github.com/dsx-ai-factory/cluster-api-provider-nico/blob/main/CHANGELOG.md) - [Commits](https://github.com/dsx-ai-factory/cluster-api-provider-nico/compare/v0.1.0...v0.2.0) Updates `golang.org/x/tools` from 0.52.0 to 0.53.0 - [Release notes](https://github.com/golang/tools/releases) - [Commits](https://github.com/golang/tools/compare/v0.52.0...v0.53.0) Updates `cloud.google.com/go/storage` from 1.70.0 to 1.71.0 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/compute/v1.70.0...compute/v1.71.0) Updates `google.golang.org/api` from 0.315.0 to 0.316.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.315.0...v0.316.0) --- updated-dependencies: - dependency-name: go.etcd.io/etcd/api/v3 dependency-version: 3.7.4 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.4 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.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/dsx-ai-factory/cluster-api-provider-nico dependency-version: 0.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.temporal.io/sdk/contrib/opentelemetry dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/tools dependency-version: 0.53.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: cloud.google.com/go/storage dependency-version: 1.71.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: google.golang.org/api dependency-version: 0.316.0 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.4 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.4 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.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/dsx-ai-factory/cluster-api-provider-nico dependency-version: 0.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.temporal.io/sdk/contrib/opentelemetry dependency-version: 0.9.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.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/tools dependency-version: 0.53.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: cloud.google.com/go/storage dependency-version: 1.71.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: google.golang.org/api dependency-version: 0.316.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 for go-dependencies group bump Signed-off-by: Terry Howe <thowe@nvidia.com> * build: regenerate third-party notices for go-dependencies group bump Signed-off-by: Terry Howe <thowe@nvidia.com> * chore: retrigger ci 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> |
||
|
|
ee3764cbe1 |
build: bump the kubernetes group across 6 directories with 1 update (#2443)
* build: bump the kubernetes group across 6 directories with 1 update Bumps the kubernetes group with 1 update in the / directory: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Bumps the kubernetes group with 1 update in the /cluster-api-provider-provisioned directory: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Bumps the kubernetes group with 1 update in the /controller directory: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Bumps the kubernetes group with 1 update in the /controller/hack/capd-reboot-controller directory: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Bumps the kubernetes group with 1 update in the /controller/test/e2e directory: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Bumps the kubernetes group with 1 update in the /management-engine directory: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Updates `sigs.k8s.io/controller-runtime` from 0.25.2 to 0.25.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.25.2...v0.25.3) Updates `sigs.k8s.io/controller-runtime` from 0.25.2 to 0.25.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.25.2...v0.25.3) Updates `sigs.k8s.io/controller-runtime` from 0.25.2 to 0.25.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.25.2...v0.25.3) Updates `sigs.k8s.io/controller-runtime` from 0.25.2 to 0.25.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.25.2...v0.25.3) Updates `sigs.k8s.io/controller-runtime` from 0.25.2 to 0.25.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.25.2...v0.25.3) Updates `sigs.k8s.io/controller-runtime` from 0.25.2 to 0.25.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.25.2...v0.25.3) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.25.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.25.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.25.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.25.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.25.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.25.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] <support@github.com> * build: regenerate third-party notices for controller-runtime v0.25.3 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> |
||
|
|
60d9c235b3 |
feat(controller): record events for kubelet client CSR approval (#2462)
Emit an event as each client CSR is approved, and emit the Machine condition event from the shared condition update when that condition changes. Signed-off-by: Ryan Bever <rbever@nvidia.com> |
||
|
|
8f1c0bf168 |
fix(e2e): stop perf stream runs failing TestAllowTenantNodeLabels (#2519)
## Summary
Since #2424, every perf stream run fails at the end, after the e2e suite itself has passed, because one unit test reads the kaps-bench run specs the stream passes in. Each case of `TestAllowTenantNodeLabels` now sets those run specs itself, so the test gives the same answer in a stream run as in a plain `go test`.
## Motivation / Context
A stream run starts the e2e package with flags from the release policy, and the same `go test` process runs the package's plain unit tests after the suite. Since #2424 the node label allowlist also depends on the run specs. With the perf stream's `-e2e.kaps-bench-run-specs` still set, the test's no-label case got the worker label back:
```
Error: Expected nil, but got: []string{"node-role.kubernetes.io/worker"}
```
That is how https://github.com/dsx-ai-factory/nvke/actions/runs/45441339912 ended, after 53 of 53 suite specs had passed and both kaps-bench specs had run. A plain `go test` never sets the flag, so the test only fails inside a stream run.
Closes: N/A
Related: https://github.com/dsx-ai-factory/nvke/issues/2089, https://github.com/dsx-ai-factory/nvke/pull/2424
## Type of Change
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Build/CI/tooling
## Component(s) Affected
- [ ] Controller (`controller/`)
- [ ] REST API (`controller/api/openapi.yaml`)
- [ ] Node agent or updater (`agent/`)
- [ ] gRPC API (`agent/pkg/agent/proto/`)
- [ ] nvkectl CLI (`cli/`)
- [ ] Cluster API provider (`cluster-api-provider-provisioned/`)
- [ ] Helm charts or deployment (`controller/deploy/`)
- [ ] NVKE telemetry pipeline (NKTP) integration (`deploy/nico/nktp/`)
- [ ] nico-sim (`controller/nico-sim/`)
- [ ] OS image or image checker (`os-image/`)
- [ ] CI / workflows (`.github/`)
- [ ] Docs / examples
- [x] Other: the e2e suite (`controller/test/e2e/`)
## Implementation Notes
Test only: its first two cases now set `kapsBenchRunSpecs` next to `monitoringWorkers`, as the third case already did. Both values keep the save and restore the test already had.
## Testing
Run on this branch (base
|
||
|
|
5a86a7c13e |
fix(controller): delete orphaned spire host entries (#2461)
* fix(controller): delete orphaned spire host entries The machine SPIRE entry controller deleted a host's ClusterStaticEntry only when it observed the Machine with a deletion timestamp. If the Machine finished deleting while the worker was down, the entry leaked. When a host is re-provisioned its TPM parent ID stays the same but its host ID changes, so the leaked entry and the new one both match the agent and it may present the old host SVID, failing the mTLS handshake. After applying a Machine's entry, delete managed sibling entries with the same parent ID whose host ID has no Machine that is not being deleted. A leader-elected sweep also runs every 10 minutes and deletes managed entries older than 1 hour whose host ID matches no Machine. Host entries labeled nke.nvidia.com/managed-by=cloud-workflow-engine by the pre-import controller are included: its node-table garbage collection was removed with it, so entries for hosts deleted around that switch were never cleaned up. Entries without one of these managed-by labels are never touched. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix(controller): keep sweeping past failed entry deletes Collect delete errors in the sibling cleanup and the orphan sweep and return them joined, so one entry that cannot be deleted no longer blocks the rest. Skip the sweep when no Machine carries a host ID: the site's own nodes are Machines, so an empty list means a bad read, not orphans. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
445bde08f9 |
feat(controller): accept enableCPNodeRecycling on cluster create (#2453)
* feat(controller): accept enableCPNodeRecycling on cluster create Add enableCPNodeRecycling to CreateClusterRequest and store it on the new cluster. Previously the field could only be set with PATCH, so an operator could not opt in at create. The e2e nvkectl rows now create with the flag set and check that the controller stored it. The existing patch spec sets the flag to false so that its check is meaningful. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): skip the create-time recycling check on a reused cluster A reused cluster is not created by the run, so initCluster sends no create request and the flag may already have been patched to false by an earlier run. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): register the create-time recycling check only on fresh runs A reused cluster was not created by this run, so its create-time flag is unknown. Skipping the spec at run time reported a skip from nvkectl_test.go, which e2e_assert_no_new_skips rejects. Leave the spec out of the tree on reused runs instead. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): read the reuse setting before the spec tree is built test.cfg is assigned inside the creates-the-cluster spec, which runs after the tree is built, so the guard read an empty ReuseCluster and always registered the create-time check. Load the config file when the tree is built instead. Signed-off-by: Meha Mehta <meham@nvidia.com> * test(e2e): patch to the opposite of the stored recycling flag A reused cluster can already hold the value the patch sets, so an ignored patch still passed. Read the stored value first and patch to the opposite, so the assertion holds on reused clusters too. Signed-off-by: Meha Mehta <meham@nvidia.com> --------- Signed-off-by: Meha Mehta <meham@nvidia.com> |
||
|
|
3ed03c7530 |
docs: document controller API authorization (#2174)
* docs: document controller API authorization Add an operator guide for API authorization: the admin and viewer roles, granting them by claim and by service account, turning authorization on in permissive mode, finding the callers enforcing mode would refuse, switching to enforcing, and the metrics to watch. Link it from the docs index, the controller README and docs, and the observability page. Pages that said NVKE does no authorization now say every admitted caller can call every endpoint until authorization is on. Signed-off-by: dbudris <dbudris@nvidia.com> * docs(operate): name the Teleport app settings the roles claim needs The token carries roles only when rewrite.jwt_claims includes them, and the header rewrite is written differently in teleport.yaml and in a dynamic app resource. Signed-off-by: dbudris <dbudris@nvidia.com> * docs: use the apiAuthz.authorizer.localBundle values paths The chart now holds the authorization bundle under apiAuthz.authorizer.localBundle, beside apiAuthz.authorizer.backend. Update the operator guide, the controller README and the troubleshooting table to match. Signed-off-by: dbudris <dbudris@nvidia.com> * docs(operate): say the chart refuses permissive authorization while it is off Signed-off-by: dbudris <dbudris@nvidia.com> * docs(operate): restructure the API authorization page after review Explain grants and the shipped roles up front, and show the apiAuth admit change a viewer grant needs. Restart NVKE when switching to enforcing mode, since only nvke-controller-config changes, and add a rollback. Name the failed-to-authorize log line, act on each outcome, and give success signals for grant changes. Split steps to one command each, move Teleport and role customization to the end, drop the metrics table that observe.md already covers, and add next steps. Signed-off-by: dbudris <dbudris@nvidia.com> --------- Signed-off-by: dbudris <dbudris@nvidia.com> |
||
|
|
6013a54cac |
feat(e2e): publish the perf stream's kaps-bench results to OpenSearch and run cluster-density-v2 (#2424)
Today the perf stream runs kaps-bench with --local-publisher, so its results reach only the kaps-bench-results.tar.gz artifact, and kaps-bench never sees an OpenSearch setting because the suite builds its environment from scratch. With KB_OPENSEARCH_URL set, the suite hands KB_OPENSEARCH_URL, KB_OPENSEARCH_USER and KB_OPENSEARCH_PASS to kaps-bench in its environment, and kaps-bench publishes to OpenSearch with the ci_job_url, release_version and release_source=nvke tags. Only the suite step of a stream with kaps-bench run specs gets the three secrets. OpenSearch's endpoint is masked in the job log and withheld from the uploaded artifacts, and its password is redacted from the results archive. A password with a line shorter than 8 bytes, which that redaction would skip, is refused before the run starts. Each run with kaps-bench also records the image digest and the version kaps-bench reports in run-inputs.txt, since the image tag floats. After the smoke test, the perf stream also runs kaps-bench's baseline/cluster-density-v2.yaml, at kaps-bench's default size and within the stream's existing time limits. Every kaps-bench run gets the tenant's worker count as --param NODE_COUNT, which cluster-density-v2 compares with the worker nodes before it starts. smoke-prometheus records the value and does not use it. Without KB_OPENSEARCH_URL, kaps-bench gets today's environment byte for byte and keeps publishing locally. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> |
||
|
|
47c3dc894c |
docs: stop scheduling compat-window removal for v0.25.0 (#2452)
* docs: stop scheduling compat-window removal for v0.25.0 Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
b28d4f13d1 |
test(e2e): scan nico-vms clusters after upgrade and scale (#2417)
The CIS scan ran only on fresh clusters, so nothing showed whether a cluster still passes once its control plane is upgraded or its node pools grow. Two nico-vms entries now scan again at those points, against the same exception register: - "nico-vms k8s upgrade" scans after creation, on 1.35.3, and again once the upgrade to 1.36.3 has replaced its control plane. - "nico-vms" scans after creation and again while its worker pool is scaled up. The scale step is split into "scales the node pools up" and "scales the node pools back down", so the scan runs while the added node is in the cluster. Both clusters are now created encrypted at rest, as CAPD core is, so the scans check the encryption configuration NVKE renders (1.2.27, 1.2.28) rather than report its absence. The upgrade entry therefore upgrades an encrypted cluster, which no lane did before. Both entries are happy-path, which the NICo VMs lane runs. Their tenant nodes boot the NVKE FDE node image, so these are the first scans of that image. The lane now passes -e2e.artifacts-dir, inside the state directory it redacts and uploads, so the scan results are kept. The tenant scan takes the point in the cluster's life it runs at, which names its spec and its results directory, kube-bench/<cluster>/<phase>. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
55f98ca375 |
build: bump the docker-images group across 2 directories with 1 update (#2290)
Bumps the docker-images group with 1 update in the /controller/deploy/k8s/capi-spiffe-exec-auth directory: alpine. Bumps the docker-images group with 1 update in the /deploy/launchlayer/capll directory: alpine. Updates `alpine` from 3.24.3 to 3.24.4 Updates `alpine` from 3.24.3 to 3.24.4 Updates `alpine` from 3.24.3 to 3.24.4 Updates `alpine` from 3.24.3 to 3.24.4 --- updated-dependencies: - dependency-name: alpine dependency-version: 3.24.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-images - dependency-name: alpine dependency-version: 3.24.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-images ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
16e762d606 |
build(deps): bump gobwas/ws to v1.5.0 for GO-2026-6940 (#2439)
govulncheck fails every merge gate on GO-2026-6940 in github.com/gobwas/ws v1.4.0, fixed in v1.5.0. The controller reaches the vulnerable ws.ReadFrame through the Teleport API client: an indirect dependency of controller/internal/teleport, called from internal/agent/tlsjwt.go. v1.5.0 no longer needs github.com/gobwas/pool, which drops out of controller/go.mod and its THIRD_PARTY_NOTICES.md. go.work.sum is refreshed with make work-sync, and the notices with make notices. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
c1ef896e22 |
feat(controller): expose observed node pool counts (#2400)
* feat(controller): expose observed node pool counts (poc) Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): keep node pool counts with pool queries Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): name compared node set current Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use a generic json equality helper name Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use inner join for node set counts Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): use node set names in count aggregation Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): consolidate node pool response mapping Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * docs: keep node pool field definitions in the api reference Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): restore single node pool response conversion Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): colocate node pool count tests Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): colocate node pool response count tests Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(api): name observed node pool count explicitly Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * fix(controller): compare template JSON numbers by exact value Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): limit JSON comparison to node pool counts Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): restore shared pool configuration comparison Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): move json equality to shared utils Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * test(controller): use unambiguous numeric precision fixtures Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * refactor(controller): simplify node pool count responses Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> * perf(controller): index nodes by node pool Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> --------- Signed-off-by: Anisha Gupta <anisgupta@nvidia.com> |
||
|
|
e92d0dc7e1 |
fix(controller): wait for cloud-init on legacy agents (#2432)
- Use a completion script for agents older than v0.1.24 - Wait for readiness to populate agent versions before preflight Signed-off-by: Vivin Wilson <vwilson@nvidia.com> |
||
|
|
42a2cbd51f |
fix(controller): keep control-plane remediation running when failure-domain discovery fails (#2425)
Any failure-domain discovery error other than infrastructure that is not yet provisioned aborted the whole control-plane reconcile, so remediation, the Kubernetes upgrade, joins and requested deletes stalled until discovery succeeded. Only the steps that choose a failure domain need it. Defer just scale-up, stuck-pending replacement, rollout, rebalance and scale-down when discovery fails, for any reason. The error is logged and the cluster requeued rather than returned, because returning it rolls back the reconcile's transaction and would undo the writes this keeps running. Closes #1640 Signed-off-by: Kaveesh Khattar <kaveeshkhattar@gmail.com> |
||
|
|
b4e7ea79b9 |
refactor(controller): move kubelet client CSR approval into kubeletcsr (#2421)
Keep the client CSR controller and its certificate-request helpers out of the bootstrap package so serving approval can share them. Bootstrap identity and authorization keep their own condition helpers. Signed-off-by: Ryan Bever <rbever@nvidia.com> |
||
|
|
dd1ed438ce |
build: bump the go-dependencies group with 8 updates (#2370)
* build: bump the go-dependencies group across 1 directory with 8 updates Bumps the go-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/prometheus/common](https://github.com/prometheus/common) | `0.73.1` | `0.74.0` | | [golang.org/x/crypto](https://github.com/golang/crypto) | `0.58.0` | `0.59.0` | | [github.com/cedar-policy/cedar-go](https://github.com/cedar-policy/cedar-go) | `1.9.0` | `1.9.2` | | [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) | `0.152.0` | `0.153.0` | | go.temporal.io/api | `1.64.2` | `1.64.3` | | go.temporal.io/sdk | `1.50.0` | `1.51.0` | | [golang.org/x/mod](https://github.com/golang/mod) | `0.42.0` | `0.43.0` | | [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.311.0` | `0.315.0` | Updates `github.com/prometheus/common` from 0.73.1 to 0.74.0 - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/common/compare/v0.73.1...v0.74.0) Updates `golang.org/x/crypto` from 0.58.0 to 0.59.0 - [Commits](https://github.com/golang/crypto/compare/v0.58.0...v0.59.0) Updates `github.com/cedar-policy/cedar-go` from 1.9.0 to 1.9.2 - [Release notes](https://github.com/cedar-policy/cedar-go/releases) - [Commits](https://github.com/cedar-policy/cedar-go/compare/v1.9.0...v1.9.2) Updates `github.com/getkin/kin-openapi` from 0.152.0 to 0.153.0 - [Release notes](https://github.com/getkin/kin-openapi/releases) - [Commits](https://github.com/getkin/kin-openapi/compare/v0.152.0...v0.153.0) Updates `go.temporal.io/api` from 1.64.2 to 1.64.3 Updates `go.temporal.io/sdk` from 1.50.0 to 1.51.0 Updates `golang.org/x/mod` from 0.42.0 to 0.43.0 - [Commits](https://github.com/golang/mod/compare/v0.42.0...v0.43.0) Updates `google.golang.org/api` from 0.311.0 to 0.315.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.311.0...v0.315.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.74.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/crypto dependency-version: 0.59.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: github.com/cedar-policy/cedar-go dependency-version: 1.9.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: github.com/getkin/kin-openapi dependency-version: 0.153.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: go.temporal.io/api dependency-version: 1.64.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: go.temporal.io/sdk dependency-version: 1.51.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: golang.org/x/mod dependency-version: 0.43.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies - dependency-name: google.golang.org/api dependency-version: 0.315.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * build: regenerate notices and workspace, move to DescribeWorkflow Regenerate the third-party notices and go.work.sum for the dependency bumps. Replace the deprecated Temporal DescribeWorkflowExecution with DescribeWorkflow, which the Temporal SDK 1.51.0 bump flags under SA1019. Signed-off-by: dbudris <dbudris@nvidia.com> * build: align workspace manifests after rebase and migrate the gofail teardown test to DescribeWorkflow Signed-off-by: dbudris <dbudris@nvidia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dbudris <dbudris@nvidia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
b6915fdb61 |
build: bump sigs.k8s.io/cluster-api/test (#2291)
Bumps the kubernetes group with 1 update in the /controller/hack/capd-reboot-controller directory: [sigs.k8s.io/cluster-api/test](https://github.com/kubernetes-sigs/cluster-api). Updates `sigs.k8s.io/cluster-api/test` from 1.13.7 to 1.13.8 - [Release notes](https://github.com/kubernetes-sigs/cluster-api/releases) - [Commits](https://github.com/kubernetes-sigs/cluster-api/compare/v1.13.7...v1.13.8) --- updated-dependencies: - dependency-name: sigs.k8s.io/cluster-api/test dependency-version: 1.13.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
4c9ed2ffb5 |
feat(e2e): run the kaps-bench smoke test on the perf stream (#2361)
* feat(e2e): run kaps-bench on the perf stream's tenant Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * feat(e2e): stage kaps-bench and helm on the perf stream's runner Today a CI perf run stops at the suite's early check: the job leaves E2E_KAPS_BENCH_DIR empty and the runner has neither kaps-bench nor helm. After this, a stream with kaps-bench run specs logs in to NVCR, sets up helm at the pinned version, copies kaps-bench and its folder out of the image pinned in make/tool-versions.mk, and checks them with list-run-specs. Each run also uploads kaps-bench-results.tar.gz with the other suite files. Every new step runs only for a stream with kaps-bench run specs, so other streams run as before and their plans do not change. kaps-bench-results.tar.gz holds kaps-bench's output dir alone: its kubeconfig sits in the suite's temp dir outside it, and kaps-bench never sees the jump hosts or the token issuer that the log scrub withholds. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * fix(e2e): check the kaps-bench binary before a machine is taken requireKapsBenchTools now refuses a kaps-bench folder with no runnable kaps-bench in it, and a folder path that is not absolute, so both fail before the site and tenant are built instead of at the first run spec. Flag help and docs list the binary among the folder contents, say the results archive is absent when no run spec got as far as writing an output dir, and say helm is needed and checked for a stream with kaps-bench run specs. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * feat(e2e): let kaps-bench install what its run specs need Perf stream policy now names the run spec smoke/smoke-prometheus.yaml in place of smoke/smoke.yaml. That run spec lists kube-prometheus-stack as something to install first, so kaps-bench installs it with the helm in its own folder and leaves it for the run specs that follow. nvke no longer installs Prometheus: the helm call and its embedded values file are removed, and the perf stream's runner no longer needs helm on PATH. requireKapsBenchTools also refuses a folder without a runnable bin/helm, so such a folder fails before the site and tenant are built. kapsBenchSetup is the renamed once-per-tenant setup and writes the cluster context. kaps-bench gets 5 minutes between SIGTERM and SIGKILL when a run spec reaches its limit. In that time it stops its engine, writes its final record and removes a chart it had half installed. 5 seconds was too short for that: a stop during a chart install took 11.2 seconds in a hand test. tenantToolRun takes the 5 minutes as a stop grace per tool, and AICR keeps 5 seconds and its 10 second wait. So that the grace fits inside the spec's limit, kaps-bench is stopped 39m50s into the first run spec and 24m50s into a later one. When a canceled command returns, every process group it listed gets SIGKILL straight away, so a child that ignored SIGTERM does not outlive the spec. AICR runs get the same. Each run spec keeps its time limit and token lifetime, and the perf stream keeps its suite timeout. In qualify-e2e.yml, the helm steps run only for the GPU runtime again, as on main. KAPS_BENCH_IMAGE stays at v0.3.1, which has no smoke-prometheus.yaml, so the perf stream stops at its early check until the pin moves to an image that has it. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * feat(e2e): give the perf stream's tenant a monitoring node Today the perf stream's tenant is one control plane and three workers, and nothing keeps the benchmark's Prometheus off the workers it measures. A stream can now ask for monitoring nodes with monitoringWorkers in release/policy.yaml, and the perf stream asks for one, so its tenant is one control plane, three workers and one monitoring node. Planning carries the value into the plan, the summary line and the matrix, and the run step passes it to the suite as -e2e.monitoring-workers. With it above 0, the suite asks the site controller for a second node pool, monitoring, whose nodes are labeled node-role.kubernetes.io/monitoring and tainted monitoring=true:NoSchedule, and labels the workers node-role.kubernetes.io/worker. Only Pods that tolerate the taint can land on the monitoring node. Pool labels and taints are applied by the controller while it provisions a node, before it lifts its own provisioning taint, so no node is schedulable without them. Both label keys sit under kubernetes.io, which the controller refuses unless its nodeMetadata.allowlistedLabelKeys lists them. A site the suite builds allowlists exactly those two keys, and only when the stream asks for a monitoring node. Taint keys under reserved domains are always refused, so the taint key is simply monitoring. Forge and DSX pool specs and the NICo and CAPD request builders now carry a pool's labels and taints where they dropped them, and the capacity check counts the monitoring node with the workers, since it takes the worker shape. A stream without the parameter, or with 0, runs as before: its plan, its run step's flags, the node pools in its create request and the site's controller values are all unchanged. Plans for every other scope are byte identical. Not proven before a real run: the tenant's OVN-Kubernetes DaemonSet comes from a bundle outside this repository. Upstream OVN-Kubernetes tolerates every taint, and this bundle was not read. If it does not tolerate monitoring=true:NoSchedule, the monitoring node never becomes Ready and the tenant create times out. kaps-bench does not place Prometheus on the monitoring node yet, so until its values select the node, Prometheus still lands on a worker. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * chore(e2e): follow the latest kaps-bench image Perf runs stage nvcr.io/j7sbcjl3qgta/kaps-bench:latest and pull it fresh each time, so every run gets the build kaps-bench main published last. A perf result can move with a kaps-bench change and no nvke change. Each run prints the image digest in its Stage kaps-bench step; compare digests before comparing two results. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * fix(e2e): redact the kaps-bench results archive kaps-bench-results.tar.gz now goes through the same substitution as nvkectl-diagnostics.tar.gz, with each withheld value and its base64 form replaced in every file of the archive. In the site lane the list is the one the site's archives get: the values withheldFromEnvironment returns and every credential the deploy places on the node. In the lane that builds no site it is the values withheldFromEnvironment returns. Perf runs follow the newest kaps-bench image, so what kaps-bench writes into its output folder can change with no change in this repository, and a failed connection's error text names the address it tried; a file with nothing to replace keeps its bytes. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * fix(e2e): refuse monitoring nodes on a tenant that gets the GPU runtime A run that installs the GPU runtime on its tenant and also asks for monitoring nodes now fails before a machine is taken: in the site lane's first step at stage full, and at the start of the tenant create in the lane that builds no site. GPU checks expect -e2e.tenant-workers GPU nodes, and the monitoring node takes the worker shape, so on a GPU run it would most likely count as one more. No stream runs that combination, so the suite refuses it up front. A run with the GPU runtime switched on and no GPU to install it on, as on the perf stream, still goes ahead and skips the runtime. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> * fix(e2e): check the kaps-bench folder before the nico-forge lane creates a tenant Against a site the suite did not build, the nico-forge lane now checks the kaps-bench folder and its run specs at the start of the tenant create, as the site lane does in its first step at stage full. Until now that lane found a missing folder only once the tenant was up and its checks had run. A run without kaps-bench run specs passes the check as before. In the e2e README, nico-forge is now the only lane named as running on a site the suite did not build, since nico-dsx runs only on a site it builds. Signed-off-by: Ganesh Reddy <gputta@nvidia.com> --------- Signed-off-by: Ganesh Reddy <gputta@nvidia.com> |
||
|
|
f75b8de15c |
feat(controller): serve controller-runtime metrics (#2084)
The manager's own metrics server is disabled, and /metrics served only the default Prometheus registry, so nothing exported the metrics controller-runtime records in its own registry: reconcile counts, errors and durations, work queue depth and latency, REST client requests and leader election status. Serve that registry from /metrics beside the default one. It carries its own Go runtime and process collectors, which duplicate the default registry's and fail the scrape, so leave those families out. Leave out the series of the controllers NVKE runs for each tenant cluster too. Their names end in the cluster's ID, so they would grow with every tenant cluster and outlive deleted ones. The management plane's own controllers keep their series. A metric both registries define differently now costs the scrape that metric, not the whole response. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |