Files
..
2026-12-01 16:14:02 -08:00
2026-12-01 16:14:02 -08:00
2026-12-01 16:14:02 -08:00
2026-12-01 16:14:02 -08:00
2026-12-01 16:14:02 -08:00

Management Engine

The management engine is designed to manage NVKE workload clusters through declarative APIs and reconciliation built on Cluster API (CAPI) conventions. Its architecture separates user and operator APIs from internal Kubernetes resources and lifecycle controllers. This module provides the internal resource types, generated CRDs, and controller-manager runtime.

Path Purpose
apis/v1 Resource types and scheme registration
config/crd/bases Generated CRDs for every kind, including MachineImage, ClusterRelease and NodeProfile
config/admission Admission policies for rules a CRD schema cannot express
cmd Connection configuration and manager startup
controllers Reconcilers

Development

See API generation for internal CRDs and generated manifests. Repository-wide guidance lives in development conventions and the workspace guide. Run commands below from management-engine/.

make build test lint
make generate manifests # after API or RBAC changes
git diff --exit-code -- apis/v1 config/crd/bases chart # check generated-file drift
make test-controller # controller integration tests (envtest)
make chart # regenerate the Helm chart with the pinned Kubebuilder plugin
make chart-check # verify generation and test all Helm installation modes
make chart-assets-check # verify the complete generated chart is current

For a drift check, start with a clean working tree before regeneration. Kustomize manifests and Go markers are the canonical sources. make manifests refreshes state definitions; make chart uses Kubebuilder and the packaging extensions in hack/chart/ to regenerate the chart. See Helm installation for chart values and topology examples. See the operator release workflow for release publication, selection and rollout verification. make test includes test-controller; the separate command runs that suite alone.

Tilt provider

Add management-engine to the provider list in controller/tilt_config.json, keeping the infrastructure providers you use. For CAPD:

{
  "providers": ["capi_core", "bgp-containers", "capd", "management-engine"]
}

After the controller's normal Kind/CAPI setup, run from management-engine/:

make tilt-up

API conventions

Resources can be addressed by name or UID. Canonical lowercase UUIDs are reserved for UIDs

The tenant and operator HTTP APIs default to snake_case. Start either server with --field-naming=camelCase to select camelCase for that entire API. Helm deployments pass this flag through tenantAPI.args or operatorAPI.args. See HTTP naming configuration.

The setting covers declared JSON fields, query parameters, selector paths, error field paths and error codes. Requests must use the selected spelling. Dictionary keys, other enum values, headers and opaque tokens retain their values. Kubernetes objects keep their canonical field names.

All types use service.nvke.nvidia.com/v1. Future public tenant and operator APIs should use separately versioned contracts. Do not expose internal structs directly.

Resource Scope Definition and example
NVKECluster Org namespace Cluster configuration, sample
MachineImage Cluster Immutable image identity and NICo boot contract
ClusterRelease Cluster Control-plane image and initialization
ClusterReleaseChannel Cluster Release catalog, sample
NodeProfile Cluster Worker image and initialization
Concern Contract
Tenancy One namespace per org per datastore. Future public APIs must derive org identity from authentication and enforce resource and field authorization.
Identity Immutable client-selected DNS-subdomain names (at most 253 characters); UIDs distinguish recreations. Provider names may have shorter limits.
Concurrency Preserve opaque resourceVersion and field ownership. Spec expresses desired state; controllers report progress through status.
Conditions Use metav1.Condition with per-condition observedGeneration matching the NVKECluster's generation. There is no aggregate status.observedGeneration. Missing or stale conditions do not establish readiness. Unknown counts are absent; observed zero counts are explicit.
References Resolve tenant references within the org namespace and pin lifecycle ownership by UID. Release references select operator-published configuration.
Node pools spec.nodePools embeds worker configuration within NVKECluster; see the cluster sample.
Replicas spec.nodePools[].replicas expresses desired worker count; zero requests zero workers. Rollout policy controls replacement.
Deletion Use deletion timestamps and controller-owned finalizers.

Schema validation cannot prove reference existence, current UIDs, or caller privileges. Namespace scoping also requires API authorization and controller RBAC.