mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
main
16
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
9ef60aca3c |
refactor(controller): emit spec.release from the platform CR converter (#1832)
cwe-to-platform-crs.sh already read .nico.release from the controller API but still wrote spec.osProfile into the generated NKENodePool. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> |
||
|
|
e34e07e355 |
feat(chart)!: default the controller chart names and SPIFFE service path segment to nvke (#1769)
* test(chart): assert default, legacy-pinned and greenfield renders separately chart-identity-assertions.py asserted the legacy names against the default render, so moving a default and keeping an existing install on its names could not be told apart. It now renders three scenarios, each with its own expectations: the chart's defaults, hack/testdata/chart-legacy-pinned-values.yaml, and a renamed greenfield install. A default that moves now changes DEFAULT only. A pin that stops holding the old name fails the legacy-pinned render. The management namespace check is folded into the scenarios, and every check runs so a failure shows which render it was. Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(chart)!: default nameOverride and the controller config ConfigMap to nvke-controller A new install now gets nvke-controller for the Deployment, Service and every object named from the fullname, and nvke-controller-config for the settings ConfigMap. The ServiceAccount, the ServiceMonitor and the nke-rbac objects keep their names; they move separately. BREAKING CHANGE: an install that predates this must set nameOverride to cloud-workflow-engine and controllerConfig.name to nke-controller-config before it takes this chart. The Deployment's spec.selector is immutable, so an upgrade that moves nameOverride fails, and the ConfigMap rename orphans the live object. hack/testdata/chart-legacy-pinned-values.yaml lists the pins. The default scenario of chart-identity-assertions.py moves to the new names and the legacy-pinned scenario does not. The chart scripts, the chart test and the e2e helpers that select the ConfigMap by name follow the default; nvke-auth-demo.sh takes it from NKE_CONTROLLER_CONFIGMAP. Signed-off-by: Terry Howe <thowe@nvidia.com> * style: gofmt map literal alignment in oidc site_test Signed-off-by: Terry Howe <thowe@nvidia.com> * feat(chart)!: default the SPIFFE service path segment to nvke-service A new install issues the controller the ID spiffe://<trust domain>/nvke-service/<service account>: the chart's default RBAC subjects, the ClusterSPIFFEID and the SPIRE admin ID now agree on nvke-service. The CLI bootstrap, the deploy path, the e2e stacks, Tilt and the e2e helpers that name the controller's ID follow. BREAKING CHANGE: an install that predates this must set spiffe.servicePathSegment to nke-service and keep its ClusterSPIFFEID and SPIRE admin ID on /nke-service/. Node agents from before the nvke rename admit only that path, and the controller dials every node with one SVID, so moving it on such a site breaks controller-to-node mTLS. chart-identity-assertions.py checks each scenario's SPIFFE subjects against its segment: nvke-service by default, nke-service in the legacy-pinned render. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: address review feedback Name the auth demo's controller ConfigMap setting NVKE_CONTROLLER_CONFIGMAP, the prefix AGENTS.md requires for settings that name the controller. Show the default SPIFFE subjects in the chart README under spiffe.servicePathSegment instead of a fixed /nke-service/. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> |
||
|
|
3317737e1e |
refactor(api): rename the OS profile surface to releases (#1612)
* refactor(api): rename the OS profile surface to releases /osProfiles becomes /releases and nico.osProfile becomes nico.release, so the REST API uses the release vocabulary the rest of the management plane already does. Internal db and workflow structs keep their field names. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> * refactor(controller): rename the OS profile to the release Nico payloads gain a release key. os_profile is still written alongside it and still read as a fallback, so a CWE predating the rename keeps reading and writing the value through a rolling upgrade or a rollback. No stored data changes. A later release backfills release from os_profile, then drops the mirror and the fallback. The os_profile Prometheus label is deliberately unchanged. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> * docs: follow the OS profile rename The request YAML in the workload-cluster guides named a field the API no longer accepts, and two troubleshooting entries quoted error text that no longer appears. The dashboard panel descriptions in operate/observe.md keep the old wording: the panels and the os_profile metric label they read are unchanged. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> * fix(scripts): read cluster NICo fields from .nico and allow an absent configProfile The cluster-level orgID, siteID and vpcID live under .nico in the API response, as the node pool fields already corrected do, so the script exited before generating anything. configProfile is optional in the same schema, and requiring it skipped a valid node pool. Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> --------- Signed-off-by: Miancheng Lin <mianchengl@nvidia.com> |
||
|
|
8c6e47fc1e |
feat(controller)!: read settings only from nke-controller-config (#1527)
The controller now takes the 61 settings nke-controller-config carries from the mounted file only. Each config.Config field that moved trades its env tag for a controllerconfig tag naming its config.yaml key, and controllerconfig.LoadStartupConfig fills them at startup from the file CONTROLLER_CONFIG_PATH names, which is now required. The chart stops setting the 61 variables, and config.Validate checks only what the environment still supplies; the file validates the rest when it loads. With no tracing.endpoint in the file, the controller falls back to the OTEL_EXPORTER_OTLP_* variables the OpenTelemetry Operator injects, as it did before. The exporter gets the endpoint as a URL whose scheme carries the resolved transport, so an injected http:// endpoint cannot downgrade a secure tracing.endpoint, and an https:// one stays secure. Host-local runs and the gofail e2e worker start from hack/local-controller-config.yaml. The e2e helpers that toggled OIDC and permissive mode on the Deployment now edit nke-controller-config and restart the controller. Rolling back across this change needs the chart and the image rolled back together: an older image under this chart runs on Go defaults for every setting the chart no longer passes. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com> |
||
|
|
3baba6d1b4 |
ci: give the name check its launch allowlist, and move the stragglers to the new name (#1484)
* chore: move test doubles, examples and stale references to the new name What the name check still reported outside the Tier 2 identifiers: synthetic names in tests (nke-site, nke-old, nke-injected, nke-role, nke-key-1 and friends), registry and path examples in documents and flag help (registry.example.com/nke, ghcr.io/my-org/nke, ~/dev/nke), development defaults (DEV_NAME, kind contexts, the promtail job, the mutagen example), stale references to packages renamed earlier (internal/nke, nke.NewClient, nkecli, nkeutils), the `nke#1399` issue shorthand, the CI image tag nke/capd-reboot-controller, the prune script's package names, and a few comments and messages. The UpdateNKERBAC rpc's errors now start with the rpc name, which no caller parses. Kept: the two synthetic fixture profiles' image URLs, because osprofiles-to-crs refuses to change a published MachineImage spec; the salt of the bring-up VMs' default password hash; the legacy installer path the kubeadm-distro test asserts is absent; the fleet names existing sites carry. The postgresql chart's description changes with a patch bump. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * ci: give the name check its launch allowlist hack/name-check-allowlist.txt grows from two entries to 48, each with its reason: the Tier 2 identifiers that stay until the post-launch release (PR4 Kubernetes, PR5 node, PR6 OS image and packages), the permanent keeps (migration names and texts, the NKEAuth magic and its package, fleet release and profile names, the identity of existing sites), the settings-coupled names (the old NGC token secret, the CODEOWNERS team slugs, the S3 and apt names, the old CLI name), and the files that keep the bare word (the agent version line the updater parses, the OIDC upstream CA subject, the Keycloak lab, the two NVCR workflows whose NGC organisation is named NKE). With it, NAME_CHECK_MODE=fail make name-check passes on this tree: 5,908 hits, all allowed, every entry in use. The make target keeps report mode until the launch flips it (W4). Closes #1483 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
48f5cab857 |
chore(controller): say controller, not CWE, in comments and log text (#1393)
Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
03cba1060d |
feat(dev): run Tilt and the e2e deploy paths with the nke-controller greenfield profile (#1271)
* feat(dev): run Tilt and the e2e deploy paths with the nke-controller greenfield profile Tilt and the capd-e2e, capnico-e2e and nke-sbom deploy paths install the controller the way a greenfield site does: release, namespace, Deployment, Service and ServiceAccount nke-controller; SPIFFE ID /nke-service/nke-controller; Temporal namespace nke-controller and queue nke-controller-tasks; database nke-controller; and the field-manager, managed-by and Teleport label/prefix values in nke-controller form. backend-e2e.sh no longer branches on Tilt versus deploy path. The e2e harness package internal/cwe is now internal/controller and defaults to nke-controller. The CWE_* settings the dev loop, CI scripts and e2e suite read are renamed NKE_CONTROLLER_*; the old names are still read for one release, including when the new name is set but empty. hack/nke-token.sh and hack/nke-auth-demo.sh find the controller in nke-controller, then cloud-workflow-engine, as nkectl does. The Tilt values file, Dockerfile, kind config and CAPD RBAC manifest are renamed to say controller. The host-debug .env.local.example and README example point at the nke-controller database, Temporal namespace and queue, and the NKTP kind-validation doc queries the controller's metrics, logs and traces under nke-controller. Tilt stops with a recreate-the-cluster message on a cluster that still runs the old release cwe in cloud-workflow-engine. The kind cluster name cwe-capi and the nico-vms bridge cwebr0 are unchanged; renaming them would force every developer to recreate their cluster or leave a stale bridge. Chart defaults are unchanged, so existing sites keep their names. The nke-sbom path now installs on a fresh cluster only, and its README says so: nothing migrates an install from an earlier revision. Signed-off-by: Aaron Patten <apatten@nvidia.com> * fix(dev): name the controller's local SPIFFE ID and auth doc examples nke-controller scripts/dev-env-spire.sh registers the host-run controller under the ServiceAccount the cluster runs it as: nke-controller when that ServiceAccount exists in namespace nke-controller, else cloud-workflow-engine. The kubectl examples in docs/authenticating-to-the-api.md use Tilt's names and say what to use on a site that still runs the old name. The comments at the cwe-capi and cwebr0 defaults describe the deferred rename without an internal tracker reference, which docs-check rejects. Signed-off-by: Aaron Patten <apatten@nvidia.com> --------- Signed-off-by: Aaron Patten <apatten@nvidia.com> |
||
|
|
5af7334722 |
refactor: remove obsolete Forge integration remnants (#603)
Signed-off-by: Ryan Bever <rbever@nvidia.com> |
||
|
|
8ed83494a4 |
fix(devx): make a local CWE run work without four undocumented workarounds (#527)
* fix(config): point PROFILES_DIR at profiles that exist The default was ./profiles, which holds example/, README.md, Dockerfile and runbooks/ -- no osProfiles/metadata.yaml. Every local run died in the database migration: failed to read metadata file: open profiles/osProfiles/metadata.yaml The profiles this repository ships are one level down. Deployments set PROFILES_DIR explicitly through the chart, so only a bare local run reads this default. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(config): accept the dev-default database credentials in the test Forge environment Validate rejects a DB_CONNECTION_STRING containing postgres:postgres@ unless CNPG_SUPERUSER_PASSWORD is also set. That is right for a deployment, but the rejected string is the compiled-in default, so 'make run' on a laptop failed on config load: DB_CONNECTION_STRING uses weak dev-default credentials: set CNPG_SUPERUSER_PASSWORD .env.local.example does not set the password either, so the file the documentation points at did not help. FORGE_ENVIRONMENT=test already means a local run that signs its own JWT instead of authenticating against NGC; the check now skips that environment and holds everywhere else. Adds the test the check never had, covering both environments. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(devx): run-local without an NGC key, and find the temporal CLI where its installer puts it Three things blocked 'FORGE_ENVIRONMENT=test make run-local': validate_api_key demanded FWE_API_KEY unconditionally, but the test Forge environment signs its own JWT and needs no key. get_temporal_cmd and check_temporal_available only looked on PATH and in flox. temporal.download/cli.sh installs to ~/.temporalio/bin and does not touch PATH, so a non-interactive shell saw 'temporal: command not found' with the binary sitting installed. The missing-temporal message named only flox. It now gives the three ways to install it. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(devx): do not require Teleport for a local run dev-check is a prerequisite of dev-start-local, and it exited 1 when tsh was missing. Only 'make run-remote' reaches a cluster through Teleport, so a local-only developer had to install it to get past the check. It is a warning now. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(config): gate the weak-credential check on the database, not on Forge Review pushed back on keying this on FORGE_ENVIRONMENT, and rightly: that variable selects a Forge backend and says nothing about which database DB_CONNECTION_STRING names. An operator could set it on a deployment reaching a real database and stand the guard down. The risk is a property of the database, so the check now asks about the database: dev-default credentials are refused unless the host is loopback. A laptop's container passes, an in-cluster or remote Postgres does not, whatever FORGE_ENVIRONMENT says. A test pins that. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(devx): set the local profiles in run-local, not in the shipped default The earlier commit pointed PROFILES_DIR's compiled-in default at profiles/example/profiles. Review found that wrong twice over: the example tree is full of REPLACE_ placeholders and its own README says the controller does not load it, and runbooks/ sits beside profiles/ rather than inside it, so EffectiveRunbooksDir would look in a directory that does not exist. A shipped default should not name developer data at all. The default goes back to ./profiles, and run-local -- a developer-only target -- points at test/fixtures/profiles, which the Tiltfile already calls the in-repo fixture, with its sibling runbooks tree. Both stay overridable. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
88e69d0afc |
build: bump the docker-images group across 9 directories with 3 updates (#187)
* build: bump the docker-images group across 9 directories with 3 updates Bumps the docker-images group with 1 update in the /agent directory: golang. Bumps the docker-images group with 1 update in the /controller/hack/capd-reboot-controller directory: golang. Bumps the docker-images group with 1 update in the /controller/internal/temporal/activities directory: dns/k8s-dns-node-cache. Bumps the docker-images group with 1 update in the /generated/aicr/observability/helm/002-postgresql directory: library/postgres. Bumps the docker-images group with 1 update in the /generated/aicr/observability/helm/data/components/postgresql directory: library/postgres. Bumps the docker-images group with 1 update in the /generated/aicr/quickstart/argocd/002-postgresql directory: library/postgres. Bumps the docker-images group with 1 update in the /generated/aicr/quickstart/argocd/data/components/postgresql directory: library/postgres. Bumps the docker-images group with 1 update in the /generated/aicr/quickstart/helm/002-postgresql directory: library/postgres. Bumps the docker-images group with 1 update in the /generated/aicr/quickstart/helm/data/components/postgresql directory: library/postgres. Updates `golang` from `640a234` to `0d1d3a7` Updates `golang` from `af8d674` to `3889b42` Updates `dns/k8s-dns-node-cache` from 1.23.1 to 1.26.8 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 Updates `library/postgres` from 17.4 to 18.6 --- updated-dependencies: - dependency-name: dns/k8s-dns-node-cache dependency-version: 1.26.8 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: docker-images - dependency-name: golang dependency-version: 1.26.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-images - dependency-name: golang dependency-version: 1.26.6-alpine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-images - dependency-name: library/postgres dependency-version: '18.6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker-images - dependency-name: library/postgres dependency-version: '18.6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker-images - dependency-name: library/postgres dependency-version: '18.6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker-images - dependency-name: library/postgres dependency-version: '18.6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker-images - dependency-name: library/postgres dependency-version: '18.6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker-images - dependency-name: library/postgres dependency-version: '18.6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: docker-images ... Signed-off-by: dependabot[bot] <support@github.com> * fix: update postgres digest to match 18.6 tag Dependabot bumped the tag from 17.4 to 18.6 but left the digest pointing at the 17.4 image. Update all nine affected files to the correct sha256 digest for docker.io/library/postgres:18.6. Signed-off-by: gpg: Signature made Tue Aug 18 09:22:55 2026 MDTgpg: using RSA key B5690EEEBB952194gpg: Can't check signature: No public keyDavanum Srinivas <thowe@nvidia.com> * fix: keep postgres data on the mounted volume under 18.x postgres:18 moved PGDATA from /var/lib/postgresql/data to /var/lib/postgresql/18/docker and made the old path fatal: the entrypoint refuses to start when it finds a mount there, even an empty one. Verified against postgres:18.6 with an empty directory mounted at the old path -- the container exits 1 before initdb. The bundles mount their emptyDir at /var/lib/postgresql/data, so the 17.4 -> 18.6 bump alone would leave postgresql in CrashLoopBackOff. Pin PGDATA back to the mounted path, which keeps the data directory on the volume and its 1Gi sizeLimit meaningful. Signed-off-by: Terry Howe <thowe@nvidia.com> * chore: refresh aicr bundle checksums after the postgres bump The bump edited rendered bundle contents without updating the integrity manifest each bundle ships, so `sha256sum -c checksums.txt` failed on 9 files across the three bundles. All three now verify clean again. Signed-off-by: Terry Howe <thowe@nvidia.com> * chore: bump dev-env postgres to 18.6 Keeps the local dev database on the same major version as the bundles. The container takes no volume mount, so the PGDATA relocation in 18.x does not apply here. Signed-off-by: Terry Howe <thowe@nvidia.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: gpg: Signature made Tue Aug 18 09:22:55 2026 MDTgpg: using RSA key B5690EEEBB952194gpg: Can't check signature: No public keyDavanum Srinivas <thowe@nvidia.com> Signed-off-by: Terry Howe <thowe@nvidia.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: gpg: Signature made Tue Aug 18 09:22:55 2026 MDTgpg: using RSA key B5690EEEBB952194gpg: Can't check signature: No public keyDavanum Srinivas <thowe@nvidia.com> |
||
|
|
1f3ef124dc |
refactor: remove Forge console API and UI from controller (#172)
* refactor: remove Forge console API and UI from controller Cut over the operator UI and /forge/* surface to forge-console; keep the Forge SDK client for provisioning. Drop Forge CIDR overlap checks from create/update so the console can validate before submit, and point helper docs/scripts at forge-console. Signed-off-by: Ryan Bever <rbever@nvidia.com> * Remove left-over UI doc references Signed-off-by: Ryan Bever <rbever@nvidia.com> * license Signed-off-by: Ryan Bever <rbever@nvidia.com> --------- Signed-off-by: Ryan Bever <rbever@nvidia.com> |
||
|
|
a3c868615c |
fix(license): normalise SPDX headers to Apache-2.0, and assert it (#197)
* chore(license): normalise SPDX headers to Apache-2.0 [machine generated] MACHINE GENERATED. Every added line in this commit is `SPDX-License-Identifier: Apache-2.0` and nothing else; every removed line is the identifier it replaces, or the notice paragraph that followed it. Verified: 0 added lines are anything other than that SPDX line. 829 files. The repository ships Apache-2.0 -- LICENSE says so and GitHub reports it -- while 676 Go files and 153 others declared a different identifier, followed by a notice that contradicted it. The copyright line, the comment style and the indentation are left alone. Files carrying the short form, two SPDX lines with no notice paragraph, have the identifier swapped and nothing else. Markdown is excluded: there the identifier appears in prose describing the mismatch rather than in a header, so rewriting it would turn the sentence into a tautology. That file is handled in the next commit. Three shapes needed care, and each is worth knowing about if this is ever repeated. controller/api/prepend-license.go carries the block inside a Go raw string, so the paragraph's last line ends with a backtick; the closing delimiter is carried back onto the SPDX line rather than dropped, or the string would be left unterminated. Two shell scripts under controller/hack/ word the final sentence differently, so matching on the common ending alone misses them. And controller/.golangci.yml prefixes each line with "# //", which has to be stripped before the paragraph text can be recognised. The templates that produce these headers are rewritten here too, so this commit is self-consistent: the five addlicense boilerplates, the five goheader templates in .golangci.yml, and the block in prepend-license.go. Every header in the tree now names the same identifier. Review the next commit. This one is a substitution. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> * fix(license): one header template, and a check that reads it The previous commit fixed the headers. This one stops them drifting again, and is the part worth reviewing. Nothing here could catch a header that named the wrong licence. addlicense only ADDS a header to a file that has none; it never rewrites one already present. So `make file-license-check` runs addlicense, finds every file already stamped, produces no diff, and passes -- whatever the header says. agent/ is the proof: its template and its check have both been correct all along, and six of its files disagreed with them. Three mechanisms defined the header and could disagree with each other: an addlicense boilerplate per module, a goheader template in five .golangci.yml files, and a hardcoded block in controller/api/prepend-license.go that stamps generated API code. They are now one file, hack/license-header.tmpl, and every module reads it. make license-header-check replaces the per-module matrix and asserts two things rather than one: that a header exists, and that it names Apache-2.0. The second assertion is what this repository never had. Verified by planting a different identifier in a file and confirming the check fails and names it. Modules resolve the template through `git rev-parse --show-toplevel`, not a relative path. A relative ../hack path silently changes meaning when a module moves, which is how cli/ broke when it moved out of controller/. The file set is the union of what the per-module targets already ignored, so this covers exactly the files stamped today. 120 files carry no header at all -- generated output, testdata, fixtures, build tooling, three .github files -- and widening the set to reach them is a separate change. Mixing headers that are WRONG with headers that are MISSING would hide both. Dockerfiles stay out: addlicense keys off the file extension and gives Dockerfile.proto C-style // comments, which Docker cannot parse. AGENTS.md's licence-header rule now describes the current state: one identifier, added by `make license` rather than copied from a neighbouring file. The ban on relicensing as a side effect of unrelated work stays. The header-check job is renamed from "License headers (<module>)" to "License headers". The merge gate calls this workflow whole rather than naming its jobs, and the branch ruleset requires only `gate` and `DCO`, so no required check changes name. Verified: GOPROXY=off make build links all five binaries with no credentials; golangci-lint goheader reports 0 issues on cli and controller; `make license` is a no-op in all five modules; make license-header-check passes over 828 files and fails on a planted mismatched header. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> stderr is not captured when reading addlicense's output. addlicense prints the offending paths to stdout, while `go run` writes "go: downloading ..." on a cold module cache and "exit status 1" on failure -- both to stderr. Folding the two together reports a module download as a file with no header, which is how the first CI run of this check failed while passing on a machine whose cache was already warm. Reproduced locally against an empty GOMODCACHE. Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> --------- Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com> |
||
|
|
906f9c3ac3 |
fix: repair a runbook dependency check that never ran, and lint shell scripts (#137)
* fix(scripts): repair three shell bugs that no check could see
All three parse cleanly under `bash -n`, so nothing in this repository
reported them. shellcheck reports every one at error severity.
configure-kube-vip.sh is the one that matters. Its dependency check read
`[ ! command -v jq &>/dev/null ]`, which does not run `command -v` at all --
the words are passed to the test builtin as operands, `[` exits non-zero on
the malformed expression, and `&&` short-circuits. The `&>/dev/null` then
hides the syntax error it emits. The result is that missing_deps stays empty
whatever is installed, so a node without jq or curl passes the check and
fails later somewhere less obvious. This script is embedded into the
controller binary and dispatched to nodes, so the check runs in production
and has never worked.
lustre-install.sh used `echo "Error: $@"` in its error helper. Inside a
quoted string "$@" expands to one word per argument, so only the first is
prefixed and the remainder arrive as separate echo arguments. Every
multi-word error message from that script is malformed.
dev-env-spire.sh captured `$(... bundle show > "${bundle_path}" 2>&1)`. Both
streams go to the file, so bundle_output is always empty and the failure
branch prints an empty "Command output:". It also writes diagnostics into
the trust bundle file itself. Swapping to `2>&1 > file` puts stderr in the
variable and leaves the file holding only the bundle; verified against a
command that writes to both streams and fails.
Each fix keeps the surrounding style: configure-kube-vip.sh now matches the
`validate_environment` helper directly below it in the same file.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
* ci: lint shell scripts
The previous commit fixed three shell bugs. Nothing in this repository could
have found them: actionlint runs shellcheck, but only over `run:` blocks
inside workflow YAML, so the 94 standalone .sh files were unchecked. All
three parsed cleanly under `bash -n`.
The gate is `--severity=error`, which the tree is clean at as of the
previous commit, so it starts green and any new error-level bug fails the
build. It is not clean at warning severity -- 36 findings remain, mostly
SC2155, SC2010 and SC2128. Those are worth fixing, but folding 36 edits into
the commit that introduces the check would have buried the three real bugs.
A second step reports the live warning count into the job summary so the
backlog stays visible without gating on it, and so the number in the comment
does not have to be trusted.
Not path-filtered, for the reason recorded in actionlint.yml and
docs/branch-protection-settings.md: a filtered check does not report on a
pull request that misses the filter, and a required check that never reports
leaves that pull request waiting forever. shellcheck is preinstalled on
GitHub runners, so running it on every push costs no self-hosted capacity.
Listed in docs/branch-protection-settings.md as requirable. As with
actionlint, that is a repository setting and this commit cannot apply it.
Raise the gate to --severity=warning once the backlog is cleared, starting
with controller/internal/runbook/scripts/, which ships inside the controller
binary and executes on nodes.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
* ci: stop the backlog report failing the shellcheck job
The gate passed; the informational step next to it did not.
shellcheck exits non-zero whenever it reports anything, and the runner
invokes every `run:` block with `bash --noprofile --norc -e -o pipefail`
regardless of what the script sets itself. So `count=$(shellcheck ... | wc
-l)` failed the step precisely when the backlog was non-empty -- which is
the only case where the step has anything to say.
Wrapping the command in `{ ...; || true; }` inside the substitution keeps
the count and drops the exit status. Verified by re-running the step under
the runner's exact shell invocation: 94 scripts, 36 findings, exit 0.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
---------
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
|
||
|
|
fd95309ade | chore: re-sync cwe from gitlab (#136) | ||
|
|
7ce92b69ce | feat: import cloud-workflow-engine (#7) |