Files
nvke/deploy/Makefile
Lia 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>
2026-10-13 14:31:52 -07:00

16 lines
680 B
Makefile

# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Paths resolve from this file, so `make -C deploy test` and `make -f
# deploy/Makefile test` do the same thing.
DEPLOY_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
REPO_DIR := $(abspath $(DEPLOY_DIR)/..)
NVKECTL := $(REPO_DIR)/cli/bin/nvkectl
.PHONY: test nvkectl
test: nvkectl ## Run the executor tests in testdata/ against a freshly built nvkectl.
NVKECTL=$(NVKECTL) $(DEPLOY_DIR)/testdata/test_nvke_deploy.sh
nvkectl: ## Build nvkectl with the cli module's own build target.
$(MAKE) -C $(REPO_DIR)/cli build