mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
pull-request/2414
18
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a014a8280b |
fix(deploy): retry a chart download refused with a 429 or a 6xx (#2553)
On 2026-11-30 and 2026-12-01 GitHub's release downloads refused chart downloads with "618 jwt:expired". helm_install retried only a 5xx, so the install failed at the first try and the CI job failed with it. The cause of the 618 is not known. helm_install now retries a 429 and a 6xx too. It makes up to 4 tries, not 3, and waits 5, 20 and 60 seconds between them, not 5 each time. In one job the download worked again a second after the fault, so the first wait stays short. In another job the same chart failed four times in 3.5 minutes, so the later waits are longer. The log line names the code and the wait. The worst case for one chart is 85 seconds of waiting before helm's error and exit code are returned. A fault that lasts longer still fails the install. An install that passes can wait that long for each chart it downloads: 255 seconds for the three charts of the e2e deploy paths. That stays inside the 15 minutes that deploy-stack.sh waits for the controller chart's CRDs. The deploy tests run the install against a stand-in helm and sleep. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
a83ace8713 |
refactor(controller): render the release CRDs from the controller chart (#2350)
* refactor(controller): render the release CRDs from the controller chart The NVKE controller and management-engine no longer share CRDs, so the nvke-crds subchart only added a helm dependency build step. Render the three release CRDs from the controller chart's own files/crds and remove the subchart, its Chart.lock and the build plumbing around it. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> * fix(controller): address review of the chart-owned release CRDs Embed the controller chart file by file, so a stale charts/nvke-crds-*.tgz in an existing checkout is not embedded and rendered a second time. Point the generated-CRD check at the generator's fixed output path instead of the overridable CHART. Keep the .gitignore entries for built chart dependencies and dist/, which existing checkouts and the CLI build still use. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> --------- Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> |
||
|
|
6cf775d50c |
fix(deploy): accept block-style items in nvke-deploy.yaml (#2013)
The items parser accepted only the inline form,
" - {name: x, type: manifest}", and refused the block form a
hand-edited list naturally uses. Accept " - name: x" followed by
" type: x" as well, mixed freely with the inline form, and keep the
parser strict: a block item without a type, a stray or repeated key,
or an unknown type is still a hard error. The suite checks that both
forms parse identically. Fixes #1990.
AI assistance was used to write this change.
Signed-off-by: Tjark Gunnar Rasche <trasche@nvidia.com>
|
||
|
|
d4577508bd |
feat(deploy): install NKTP from NGC (#2237)
* feat(deploy): install NKTP from NGC Signed-off-by: Vineeth Bandi <vbandi@nvidia.com> * fix(deploy): probe NGC egress in check-site Signed-off-by: Vineeth Bandi <vbandi@nvidia.com> * fix(deploy): address coderabbit comments Signed-off-by: Vineeth Bandi <vbandi@nvidia.com> --------- Signed-off-by: Vineeth Bandi <vbandi@nvidia.com> |
||
|
|
08d0bcd575 |
refactor(helm): extract shared NVKE catalog CRDs (#2166)
Extract the shared MachineImage, ClusterRelease and NodePoolRelease definitions into a catalog chart, preserving the NVKE controller’s default installation and ownership. Reuse canonical definitions across Helm, Kustomize, generation and CLI packaging. Closes #2165 Created with AI assistance Signed-off-by: Mark Stillwell <mstillwell@nvidia.com> |
||
|
|
8eed5173c8 |
feat(deploy)!: move the greenfield overlays and the release namespace to nvke-controller (#1889)
* feat(deploy)!: move the greenfield overlays and the release namespace to nvke-controller This moves them, and with them the persisted identifiers a site carries: the Helm release and its namespace, the database, and the Temporal namespace and task queue. In the three greenfield stacks: nameOverride, fullnameOverride, namespaceOverride, serviceAccount.name, serviceMonitor.name, appDb.dbName, the Temporal namespace and queue, the field managers and the managed-by values, tracing.serviceName, and the objects the stacks render around them -- the Namespace manifest, the Postgres CREATE DATABASE, the SPIRE admin ID and ClusterSPIFFEID namespace selectors, the auth-dev ConfigMap's namespace, the CAPD RBAC ClusterRole and its subject, and the spire-client probe URL. Consumers that move with it: controller/Tiltfile (release name, namespace, SPIRE admin path and the string-matched resource names), deploy/check-site.sh, the e2e site helpers and their collect script, cli/internal/bootstrap/controllerdeploy (including the NodePort Service nvke-controller-external), cli/internal/deploypath's admin path, management-engine/hack/nvke-controller.sh, and the CI lane scripts. The discovery paths search the new name first and keep the old one: nvkectl's authConfigNamespaces, nvke-token.sh, nvke-auth-demo.sh and dev-env-spire.sh now try nvke-controller, then nke-controller, then cloud-workflow-engine. The reference health dashboard matches all three workload names, and Tilt's preflight refuses to take over a cluster that still runs the nke-controller release rather than failing later. The published image keeps its name per #1554 decision 2, as do the nke-controller-config ConfigMap and the nke-controller-chart release artifact; hack/name-check-allowlist.txt now carries one entry per reason rather than one blanket token. Refs #1861, #1554, #1496, #1818 Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Name nke-controller as the intermediate namespace in the authentication docs, matching authConfigNamespaces, and restore the legacy node-agent audience in the exchange mock's test. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Signed-off-by: Terry Howe <thowe@nvidia.com> * fix(e2e): point the nico bootstrap lane at the nvke-controller namespace The nico lane still asserted the tenant credentials Secret landed in nke-controller, so both e2e (nico) jobs failed after the rename. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix(deploy): carry the nvke-controller rename into the rebased files The rebase onto main replayed the rename over two files that gained nke-controller references after the branch was cut: the management-engine dev overlay, which succeeds the hack script this branch had edited and was removed in #1918, and an API-authentication example added in #1935. Refs #1861 Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Continue namespace discovery past a Forbidden lookup in nvke-token.sh and nvke-auth-demo.sh. --ignore-not-found suppresses absence, not denial, so a kubeconfig scoped to nke-controller alone died on the nvke-controller probe before reaching the namespace it can read -- the migration case this branch adds. Keep the first denial, try the remaining candidates, and fail with it only when none was readable, since falling back to cloud-workflow-engine needs a confirmed absence. Refs #1861 Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
c521a57310 |
fix: local site setup repairs (#1843)
* fix: cleanups from 1725 Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: code review comments from original site-bootstrap work Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: coderabbit repairs Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: back out colima auto upgrade Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: image variable passing Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: check nerdctl image version Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> --------- Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> |
||
|
|
789a42d745 |
feat(deploy): issue the OIDC upstream CA with the NVKE subject on new sites only (#1890)
* feat(deploy): issue the OIDC upstream CA with the NVKE subject on new sites only The CA's subject still said NKE. Changing it re-issues the CA with a new private key, which invalidates the trust anchor every tenant of an existing site has embedded, and nothing distinguished a first install from a re-run of `nvkectl ... install`. Add a create-if-absent directive to the manifest-item contract: a .yaml file naming `<kind>:<name>:<namespace>` is applied only when that object is not in the cluster. The probe is a read, so it runs under --dry-run too and a dry run still describes the install that would happen; a probe that fails for any reason other than NotFound stops a real install rather than read an unanswered API server as "absent", which is the direction that re-creates the object. Split the Certificate out of oidc-upstream-ca.yaml so the two Issuers beside it, which carry no key material, keep being applied every install, and gate the Certificate on its CA Secret -- the Secret holds the key material tenants trust. Then move the subject to NVKE. Closes #1863 Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Name the CA certificate, not its private key, as the trust anchor tenants embed, and say what the leaf losing its chain means. Say that the gate belongs to the executor: a tool that does not read the directive applies the Certificate and re-issues the CA. Add it as step 5 of what another executor has to do, with the GitOps shape of it. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
df9890c530 |
feat: make local-site-setup prepares the local site for the operator flow (#1725)
hack/local-site.sh setup stands in for what a data center, a build and the lab hand an operator: it starts a container node from the bootstrap substrate and records its hosts.csv and SPIRE CA, builds the controller image and the profile content image from the checkout and stages them into the node's containerd, writes the stack config naming them, the API NetworkPolicy with the lab's networks, the release set and a tenant request for the machine's architecture, starts nico-sim with its container backend and bridges the two container networks, and writes a workspace with env.sh. The operator flow is then typed as on real hardware: nvkectl generate sitespec, nvkectl bootstrap site, clusterctl init, the install, the NetworkPolicy, set-site, the releases, a tenant. deploy/nvke-deploy-local.sh install wraps the executor for that flow: the lab StorageClass before, nvke-deploy.sh install on deploy/nico with the inputs read from NVKE_SITESPEC, NVKE_STACK_CONFIG and NVKE_KUBECONFIG, and the SPIRE exec-auth patch after. The local-site page shows that sequence and links each step's operator page. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
9c8ff900e9 |
feat(cli): the render keeps credentials out of the values files (#1610)
* feat(cli): the render keeps credentials out of the values files No values file the render writes carries a credential. Every chart on deploy/nico reads its secret from a Kubernetes Secret by name, and the render writes those Secrets as one manifest item, site-credentials, added right after the first item: nvke-database in the postgresql, temporal and controller items' namespaces, with the password from NVKECTL_DATABASE_PASSWORD and the controller's connection string, and spire-upstream-ca in the spire item's namespace when the site uses a CA. The namespaces come from each item's release.yaml. The Secrets are written as data, not stringData, so the server-side apply the executor uses can update them on a later install. The connection string escapes the user and password as URL userinfo. SPIRE no longer takes the CA through --set-file; the chart creates no Secret of its own. nvkectl render deploy-path --credentials external renders for a tree that lives in a repository: no credential variable is read, no CA file is read, no Secret and no .gitignore are written, and the command lists the Secrets the cluster has to hold, namespace, name, keys and type. A template file is split into its documents and each is classified by its own kind, so a ConfigMap beside a Secret still reaches the tree. Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): an external render loads the site spec without the CA sitespec.LoadDescription reads the site spec without the SPIRE CA: the variables are not read and no file is opened, and spire.upstreamCA still says the site uses one. The external render uses it, so a host that renders a tree with no secret needs no CA key. Template streams are split with the YAML decoder, so a separator with a comment or a tag still starts a new document. A deploy path that already lists a site-credentials item is refused. The suite's base64 assertions no longer depend on line wrapping. Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): merge the site-credentials Secrets by name and keep an external tree portable Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix(deploy): refuse a --values-for appDb override the controller would ignore Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: use yaml parser not shell for parsing yaml Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Patrick Christopher <pchristopher@nvidia.com> |
||
|
|
0c48b2612e |
feat: bootstrap site can use capnico for initial node creation (#1356)
* fix: rebase Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: rebase repair Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: make bootstrap nico follow patterns of tenant nico registry Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: dry-run catches mTLS mismatches Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: code review updates Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: linter fixes Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: code review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: refactor, comment update Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: review changes, use approved schema Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: nico bootstrap troubleshooting Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: capnico manifest Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: review comments Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: local agent reviews Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: local agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * feat: move credentials from sitespec to env vars Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent fixes Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent reviews Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> * fix: more agent review Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> --------- Signed-off-by: Patrick Christopher <pchristopher@nvidia.com> |
||
|
|
8bcb48d4f9 |
feat(cli): the stack install reads a stack config file (#1682)
* feat(cli): the stack install reads a stack config file The controller stack install takes its site-specific input from a JSON file of its own, the stack config, loaded by the new cli/internal/deploypath/stackconfig package: the NICo API and the optional image overrides and mirror. The file is decoded strictly through sigs.k8s.io/json, so an unknown, duplicate or differently cased key is refused, as are a REPLACE_* placeholder, an empty required value, a null object, an endpoint without a scheme or with a user and password, and a mirror with a scheme. Every problem is reported at once as "<json path>: <problem>", a stray key beside the value problems. The credentials stay in the environment and move to the same package: NVKECTL_NICO_TOKEN, NVKECTL_NODE_USER, NVKECTL_NODE_PASSWORD and NVKECTL_DATABASE_PASSWORD are the stack install's input, not the site spec's. The site spec carries the bootstrap's fields only: the site name, the control-plane VIP, the SPIRE trust domain and CA. The render reads both files, --sitespec with --stack-config and neither without the other, and takes the nodes' architecture from --arch, validated, for both the release artifacts and the SPIRE TPM attestor checksum; without the flag the host's architecture is used with a warning. nvkectl inspect stack-config, a hidden reader like inspect sitespec, validates the file and the credentials and prints STACK_CONFIG, STACK_NICO_ENDPOINT and STACK_NICO_ORG_ID for the install scripts. validate sitespec checks the site spec and prints "valid"; inspect sitespec prints the three site facts. deploy/examples/stack-config.json is the operator's starting point. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): the scripts take --stack-config and read the node architecture check-site.sh and nvke-deploy.sh take the stack config beside the site spec and refuse one without the other. Both start with an inputs line that names the two files, the site and the NICo endpoint. The check validates the stack config and the NVKECTL_* credentials through nvkectl inspect stack-config and fails on nodes that report two architectures or none. The executor reads the architecture from the cluster and passes it to the render as --arch; --arch on the executor stands in for the read, and a dry run with an unreachable API renders for the host. The kind lane fills a stack config template next to the site spec template. The deploy READMEs and the cli docs describe the file. Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * docs(operate): the install reads a stack config file The install page gets a "Write the stack config" section with the credentials step, the example file and every key. The inputs table, the artifact-source table, the check and install commands, the troubleshooting entries and the pages that link to the section follow. The node architecture is read from the cluster, so no page asks for it. Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
1ededf3bce |
refactor(cli)!: read site credentials from the environment and drop unused site spec fields (#1644)
The site spec describes the site, so it can be committed and used unchanged on any machine. Credentials and machine-local file paths now come from the environment of the command that needs them, and fields nothing consumed are removed. A spec that still sets a removed field fails to load, and generate sitespec --set refuses it, naming the replacement. - spire.caCertFile/caKeyFile -> NVKECTL_SPIRE_CA_CERT_FILE/_KEY_FILE, with spire.upstreamCA: true recording that the site uses the CA; with it every run requires the variables, so none falls back to a self-signed root - SPIRE_CA_CERT_FILE/SPIRE_CA_KEY_FILE are refused, naming their replacements - controllerStack.nico.tokenFile -> NVKECTL_NICO_TOKEN - controllerStack.tenant -> NVKECTL_NODE_USER, NVKECTL_NODE_PASSWORD - controllerStack.database.passwordFile -> NVKECTL_DATABASE_PASSWORD; the render no longer generates and writes a password file, and the removed-field error names the old file whose contents to use - controllerStack.nktpValuesFile -> nvke-deploy.sh --values-for nktp=<file> - registry block, --registry-api-key and REGISTRY_* overrides removed: no code read them; private image pulls use nerdctl login - validate sitespec checks the environment; bootstrap site logs the CA paths - CI harnesses and docs follow the same inputs; the bootstrap e2e asserts a supplied CA is the root SPIRE publishes Signed-off-by: Abhinav Pandey <abhinavmpandey08@gmail.com> |
||
|
|
5038f6faaf |
feat(deploy): check-site.sh, and the site controller install as a list of commands (#1586)
* feat(cli): inspect sitespec prints the site values the shell reads A hidden command: the site name, the management VIP, the trust domain and the node architecture of a site spec, as shell assignments. deploy/check-site.sh reads the architecture through it. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): the stack install needs no registry pull secret CAPNICo's GHCR package is public, and with a release its image comes by digest from the release's registry or the local layouts. The site spec loses controllerStack.pullSecret, the deploy path renders no ghcr-imagepull Secret, CAPNICo's manifest names none, and the e2e suite and the kind lane take no GHCR credential. A site spec that still carries the block no longer loads. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): check-site.sh reports what the site needs before the stack installs One line per finding and the fix with it: the tools and the helm pin, the checkout, the site spec, the release description and its declared qualification, the run directory, the cluster API, an odd node count, the node architecture against controllerStack.arch, the control-plane taint the bootstrap removes, exactly one default StorageClass, the Cluster API version, egress and disk. It changes nothing and exits non-zero on a FAIL; when ready it prints the executor command. --diagnostics writes nodes, pods, events, helm releases and the controller logs under the state directory after a failed step. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: the kind lane runs the site runbook in order check-site.sh, clusterctl init, the executor, then the SPIRE exec-auth patch, the order the install guide gives. apply-capi-spiffe-exec-auth.sh takes --kubeconfig so every kubectl call is pinned to the site cluster. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): check-site.sh treats a failed cluster read as a finding; the e2e suite expects the executor's subcommand A denied, timed-out or flaky kubectl read used to come back empty and pass, so a Cluster API that could not be read was reported as not installed yet. Reads now fail the finding with kubectl's error, and only NotFound means Cluster API is absent. The wrong-version finding names the clusterctl upgrade command instead of a page that has none. The ready line prints the init command only when one was emitted and the executor by its resolved path. The suite covers denied reads, an installed Cluster API and the NotFound case. The e2e dry-run test expects nvke-deploy.sh install, which is what the stack driver builds. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): check-site.sh findings hold under more clusters; the executor refuses an unknown item type The taint finding matches NoSchedule only, not PreferNoSchedule. The Cluster API finding compares the image tag with a digest suffix stripped, and a core at the pin without the kubeadm providers is a finding. A missing nvkectl is a finding that skips the site spec and release checks rather than an exit. Printed commands are shell-quoted. The verdict and the diagnostics line carry the script's own name. inspect prints no trace ID, so every line of the check is a finding. The executor's item parser accepts only the item types the deploy path format defines, so an unrendered path with an unknown type is refused before anything is applied. The e2e driver writes placeholder registry values for controller releases whose base-config template still reads them. The exec-auth script refuses an empty --kubeconfig. The kind lane workflow runs on changes to the files the lane now executes. The suite covers an even node count, an architecture mismatch, two default classes, an unreachable API, a core-only Cluster API, a missing nvkectl, the unknown item type, and asserts the check makes no mutating kubectl call. lib/common.sh holds only what the check uses. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * test(deploy): fix a quoting slip in the suite An apostrophe escape meant for a single-quoted string sat inside a double-quoted one and turned the rest of the file into a string. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * chore(deploy): the check and the lane name the operator guide that lists the install steps Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): the check reports what it cannot read; the e2e placeholder registry is one no image uses A denied read of a kubeadm provider is a finding and no longer followed by an 'already installed' pass. A Cluster API image pinned by digest alone is reported as such rather than by its repository name. The commands inside findings quote their paths. A site spec that nvkectl cannot read is a finding, not an exit. The e2e driver's placeholder pull-secret names a server no image uses, so older controller releases that render it pull the public CAPNICo image anonymously. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
eac79fa4c1 |
ci: bring the controller stack up on kind from a release, rendering inside the executor (#1583)
* ci: bring the controller stack up on kind from a release description The lane builds the controller and the profiles fixture into OCI layouts, copies the CAPNICo image, fills a nvkr.dev/release/v4 file from their digests, renders deploy/nico against it with --nvkr-run-dir, installs the result on a kind node and checks the pods run the release's digests. Advisory; not a merge-gate member. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): close the deferred findings of the site render spire.trustDomain is required and never derived. The controller reads its connection string from the chart's Secret, URL-escaped. A deploy path missing a site-values item is refused. A malformed release.yaml is reported once. Notes reach the log only when the render succeeds. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * chore(deploy): build the test nvkectl with the cli target and resolve Makefile paths from the file Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * docs(deploy): say which per-site values the render supplies and from where Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: give the kind lane the nktp values the other kind lanes use Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): render for the site and the release inside nvke-deploy.sh install --sitespec … --release … [--nvkr-run-dir …] renders the deploy path through nvkectl into a private scratch directory, installs it and removes it, so no rendered credential is left behind. nvkectl render deploy-path is hidden: the script is its caller. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: the kind lane renders and installs through nvke-deploy.sh Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: free the runner's disk before the kind lane and record disk usage on failure The stack's images filled the root volume; the postgres layer could not be extracted. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> (cherry picked from commit 2dda40b10fc3cac98edcb136c97f70a9ac748f72) * ci: the kind lane checks the stack's own workloads, not every pod An nktp gateway autoscaler may add a replica the runner cannot schedule; kubectl wait --all then reports every later pod as timed out unchecked. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: the kind lane caps nktp's autoscaled collectors at one replica and asserts every stack pod Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: the kind lane takes the nktp kind values as they are once they carry a ceiling Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: the kind lane checks the clusterctl digest, names pod-list errors and asserts the spire namespaces The pod sweep covers nke-system and spire-system, where the agent and the CSI driver run, instead of a namespace no deploy path creates. A failed pod list stops the lane with its namespace. The nktp guards match a whole maxReplicas: 1 line. clusterctl is checked against the pinned sha256, and the lane runs on every input it reads. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): validate sitespec requires the trust domain the render requires validate sitespec reports a missing spire.trustDomain, so its exit code means the file is ready for the controller stack install. The render checks the trust domain and the TPM checksum before it generates the database password, so a refused spec leaves no file behind. The template and the docs say the field is required for the stack install. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): --release needs --sitespec, which names the architecture Without the site spec the render would pick artifacts for the host architecture. The usage says --dry-run still renders and may create the database password file. The docs describe the rendered tree as the scratch tree the install removes. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * chore: drop an orphan comment from .gitignore Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: the kind lane's release carries the release-description/v1 schema Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(cli): the bootstrap and the stack install share a default trust domain Both default to nvkectl-bootstrap.nke.local, the domain of a bootstrap with the default cluster name, so a site spec that sets spire.trustDomain to nothing joins them to one domain. The render warns when it uses the default; the bootstrap tells the operator to set the field when it ran under another cluster name. validate sitespec no longer requires the field, and says the bootstrap can run with the file while the controllerStack section is still to fill in. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): the render scratch lives under a private state directory and the kind lane proves it is removed The render goes under NVKE_STATE_DIR (default $XDG_STATE_HOME/nvke), created 0700, and is removed however the script ends. The suite checks the directory mode and that a failed render leaves nothing. The kind lane runs an install whose render fails and the real install under its own state directory, and dies if either leaves a scratch tree or any rendered file behind. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * docs(cli): spire.trustDomain is set once before the bootstrap, or never Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * ci: the kind lane works in a per-run directory it never empties, and runs on site-spec changes The telemetry docs name the site spec's clusterName and nktpValuesFile as the inputs of a site install, and --config and --values-for for an install without one. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): the bootstrap says when it defaults the trust domain; the kind lane owns its cluster and waits for Ready The bootstrap logs the defaulted trust domain as soon as it takes it, and warns when a custom bootstrap cluster name makes it differ from the install's default; validate sitespec qualifies the shared default the same way. The kind lane refuses a kind cluster of its name that was there first and deletes only one it created, and a pod counts as ready only when its Ready condition is True. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * docs(deploy): the usage says where the render lives once, and what --nvkr-run-dir is for Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix: the review round on the kind lane and the trust-domain docs The bootstrap says it defaulted the trust domain before a dry run returns. The docs qualify the shared default for a renamed bootstrap cluster, and the troubleshooting entry names an install the script accepts. The password file note is said at once. The executor renders with --ephemeral, so the summary does not ask the operator to delete a directory the script removes. The kind lane runs on the mirror branch only, on every input it reads, and its cleanup probe has to fail in the render itself. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
44a136a877 |
feat(cli): the install reads the release description nvkr release export writes (#1598)
* feat(cli): the install reads the release description nvkr release export writes The release input is the nvkr.dev/release-description/v1 document: every output with its reference and digest, a native output's os and arch, a multi-arch image's index children, and a chart's version. The reader takes only that schema. The render refuses a chart the release carries at another version than the item pins. inspect nvkr-release prints the reference, the root digest and the declared qualification. The export describes a release and verifies nothing; nvkr release verify decides that for the same reference. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): the chart-version check applies to repository charts; the reader refuses filtered and malformed descriptions A path chart's pin is a placeholder the chart at the path overrides, so the release's version is noted, not compared. A repository chart's pin selects what installs: the release has to name that version, and a missing one is refused too. The reader refuses a filtered description, an image index without children or missing a required platform, an os without an arch, an output carrying both arch and an index, and a platform that is not os/arch; a platform outside the supported set is reported by Select for the output asked for, not at parse. Select takes a suffixed name's own suffix as its architecture and prefers the suffixed output named for the architecture. The package doc and the help say the export is unverified and verify runs first. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): the release decides the version of every chart it carries A chart the release carries is installed from the release's archive by digest, so its version is the release's: the rendered release.yaml records it. A pin that names another version is a warning that points at the item's values, not a refusal; the pin decides only for a chart the release lacks. The 0.0.0 placeholder of a chart in this tree is no difference. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): a path chart names no version A repository chart is selected by its version, so release.yaml pins one. A path chart carries its own in its Chart.yaml, and a release that carries the chart decides, so the pin is gone from the controller and nktp items in deploy/nico and the e2e deploy paths. Both readers accept the absence; the rendered copy records the release's version. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): a platform variant is its architecture; path charts in the e2e paths name no version Select and the required-platform check compare on os/arch, so a child published as linux/arm64/v8 serves linux/arm64. The item parser refuses an empty version on a repository chart like the Go reader does. The e2e postgresql items lose their version like the controller items did, and the stack script's words about pins match. gofmt on the test file. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
97ca3ab273 |
feat: install the controller stack from an NVKR release (#1428)
* feat: install the controller stack from an NVKR release nvkectl render deploy-path takes the release description nvkr release verify prints (nvkr.dev/release/v4) beside the site spec: charts the release carries are pulled by digest into charts/<item>/ and verified, image artifacts become a release-images.yaml values file or a kustomization, images.txt lists the images the result runs, and with --nvkr-run-dir everything comes out of a local Run's OCI layouts. Each item's release.yaml binds the NVKR artifacts it uses by name. The executor applies the result: an archive chart.path skips the dependency build, a kustomization.yaml is applied through kubectl kustomize, and images.txt layouts are imported into the node's containerd first. --chart-override is gone; the release is the single chart source. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * refactor(cli): pull release charts with oras-go instead of the oras binary The render resolves and fetches chart manifests and archives through oras-go v2: a registry and an OCI layout are the same read-only target, digests are verified by the store, and the --oras flag goes away. The operator no longer needs oras to render. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * chore(cli): regenerate third-party notices for the OCI dependencies Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): name release images repository@digest in images.txt A release may reference an image as repository:tag@digest. The inventory drops the tag, so the imported name matches the one the values and the kustomization ask containerd for. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): import images with containerd's local path and check the digest alias ctr images import --local names every manifest of the layout <repository>@<digest>; the transfer import keeps an annotated name and skips that alias. The executor checks the alias exists after the import. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): cancel registry requests with the command context Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(deploy): read images.txt before importing, so docker exec cannot eat the list CTR may be `docker exec -i`; inside a while-read loop its stdin is the list, and the post-import check consumed every line after the first. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * test(cli): rename the node image fixture artifact to nvke-node-image Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> |
||
|
|
ac96cd13f0 |
feat(cli): render a deploy path for the site the site spec describes (#1567)
* feat(cli): render a deploy path for the site the site spec describes nvkectl render deploy-path copies a deploy path and resolves it for the site: the controller, SPIRE, PostgreSQL and Temporal items get a site-values.yaml built from the site spec's controllerStack section (the database password, the OIDC discovery URL, the SPIRE server address and identity, the controller's admin ID, the TPM attestor checksum, the bootstrap CA, a registry mirror), template items are rendered with Go text/template and become manifest items, and site.env names the site. Secrets are read from the files the spec names and written into the result, so it is created 0700 and is for one install. The executor installs the result with no --config. deploy-test joins the merge gate with the executor's dry-run suite; the executor stops on a parser failure instead of installing nothing. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * docs(cli): name the item list file by its current name Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): review fixes for the site render A rendered tree installs from anywhere: a committed chart.path is written absolute, and the executor takes an absolute chart.path as is. Secrets holding a quote, a backslash or a control character are refused by field, since the templates carry no escaping. spire.ca*File resolve from the working directory, as bootstrap site reads them. The OIDC domains are read from the overlay as YAML, so a comment inside the list no longer truncates it. --out is created first with Mkdir, so an existing directory is left alone, and --out inside the deploy path is refused. A manifest item's image: rejects a digest. nktpValuesFile without an nktp item is a problem. The bootstrap's TPM checksum lookup calls the exported one. The test suite's mode check is portable and its order check can fail. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): refuse a checkout path with whitespace in the render The rendered chart.path is one unquoted token for the deploy path reader, so a checkout under a directory with a space rendered and then failed at install time. The render now reports it. The --out guard resolves symlinks before comparing with the deploy path. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * refactor(cli): export the TPM attestor checksum lookup as is Rename tpmPluginChecksum instead of wrapping it; the render tests for an empty checksum like the bootstrap does. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): refuse unknown item types and whitespace in absolute chart paths Items accepts only the four types the executor dispatches. The whitespace check covers an absolute committed chart.path too. The nested --out test runs on a copy of the deploy path. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(cli): keep the database password in the operator's file only controllerStack.database.passwordFile is required. A missing file is created with a generated password, 0600. The rendered tree holds no db-password copy. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(deploy): reference the SPIRE CA with chart.setFile instead of copying it A helm item's release.yaml takes chart.setFile: <helm key>=<absolute path> entries the executor passes as --set-file. The render points the spire item at the operator's CA files; spire/site-values.yaml holds no PEM. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(cli): name the credential files of a rendered deploy path The render lists the files under --out that hold a credential and writes a .gitignore that ignores the tree, so the operator knows what to delete and a repository does not pick it up by accident. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * feat(cli): refuse a rendered deploy path under a shared temp directory --out under /tmp, /var/tmp, their /private forms or the process temp directory is refused before anything is written. Tests opt out through RenderOptions.AllowTempOut; the deploy suite through NVKECTL_RENDER_ALLOW_TEMP_OUT=1. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> * fix(cli): keep temporal's passwords under a mirror and refuse incomplete site values A mirror merges into temporal's server values instead of replacing them. The render refuses a missing profiles image when the deploy path enables profiles.image, an empty secret file, a template value the templates cannot carry, an image override with no tag or digest, a template item with no template, and an item named . or ... A symlinked deploy path is resolved; copied files keep their owner exec bit. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Lia Campbell <liac@nvidia.com> --------- Signed-off-by: Lia Campbell <liac@nvidia.com> |