Files
nvke/docs/qualification/environments.md
Ganesh Reddy 7042b30115 feat(e2e): perf tenant with 3 control planes, 2 monitoring, 50 workers (#2524)
## Summary

Each perf stream run now builds a tenant with three control-plane nodes, two monitoring nodes and 50 workers, up from one, one and three. A stream picks its control-plane count with a new parameter, and on Forge the site gives those nodes one shared address. Tenant waits grow with the node count, and the perf stream's time limit goes from 260 to 400 minutes. A stream that leaves the parameter unset keeps one control-plane node, so every other stream keeps its shape and its limits.

## Motivation / Context

Every perf run today measures a tenant with a single control-plane node, so no perf run covers a highly available tenant, where several control-plane nodes share one address. That address is the control-plane VIP, and the suite's Forge path never sent one.

kaps-bench also sizes its load from the worker count: cluster-density-v2 runs nine iterations per worker, so three workers give it 27 iterations and 50 give it 450.

Closes: N/A
Related: https://github.com/dsx-ai-factory/nvke/issues/2089

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Build/CI/tooling

## Component(s) Affected

- [ ] Controller (`controller/`)
- [ ] REST API (`controller/api/openapi.yaml`)
- [ ] Node agent or updater (`agent/`)
- [ ] gRPC API (`agent/pkg/agent/proto/`)
- [ ] nvkectl CLI (`cli/`)
- [ ] Cluster API provider (`cluster-api-provider-provisioned/`)
- [ ] Helm charts or deployment (`controller/deploy/`)
- [ ] NVKE telemetry pipeline (NKTP) integration (`deploy/nico/nktp/`)
- [ ] nico-sim (`controller/nico-sim/`)
- [ ] OS image or image checker (`os-image/`)
- [x] CI / workflows (`.github/`)
- [x] Docs / examples
- [x] Other: the e2e suite (`controller/test/e2e/`), the release planner and the release policy (`release/`)

## Implementation Notes

### Control-plane count and VIP

- `tenantControlPlaneNodes` joins `tenantWorkers` and `monitoringWorkers` in the stream parameters (`release/pkg/qualification/policy.go`). A negative value fails validation, and zero or unset means one.
- `release/hack/qualify-e2e.sh` carries it to the suite as `-e2e.tenant-control-plane-nodes`, the same way `monitoringWorkers` travels, and the qualify summary prints it.
- `forge-perf.yaml` reads the site's `controlPlaneVIP` from `FORGE_PERF_CONTROL_PLANE_VIP`, empty for none, and `qualify-e2e.yml` passes that variable from the GitHub environment and lists it and the count in its resolved-inputs table.
- On Forge the tenant gets the requested count, and the site VIP only when it has more than one control-plane node. An entry that names its own VIP keeps it. A full-stage run that asks for more than one control-plane node with no VIP stops before any machine is taken, and so does a count below one. Its capacity check counts every control-plane node.
- Only the Forge tenant applies the count. A full-stage run on another provider that asks for more than one control-plane node stops before any machine is taken.

### Perf stream shape

- `release/policy.yaml`: the perf stream sets `tenantControlPlaneNodes: 3`, `monitoringWorkers: 2` and `tenantWorkers: 50`. Its `suiteTimeoutMinutes` goes from 260 to 400.
- `tenantProvisionTimeout` gives 45 minutes up to ten tenant nodes and one more minute for each node above that, so 55 nodes get 90. Two waits use it, the tenant create wait and the readiness check, so neither cuts the other short. Each goes from 45 to 90 minutes for this stream.
- `tenantProvisionTimeout` is computed when the spec tree is built, after flags are parsed, so the nico-forge lane and the qualify site lane both get it. Simulator lanes keep their own create budgets, and their readiness timeout stays 45 minutes at default flags.
- Why 400 minutes: take a site build and checks of about 34 minutes (about 30 on our az41 run), then let the two waits, kaps-bench and the delete each use their full limit: 90 and 90, 75, and 75. With about 25 minutes of site cleanup that is 389. With a shorter limit the suite deadline could fire during the delete and leave machines allocated.
- kaps-bench keeps its time window per run spec. cluster-density-v2 has not run at 450 iterations yet, so the first full-size run shows whether its 30 minutes are enough.
- One policy test now expects two monitoring nodes on the perf stream. Both READMEs (e2e and release) and the two qualification docs describe the parameter, the VIP variable and the new tenant.

## Testing

Run on this branch (base 0a09cd0ed) on macOS arm64:

```bash
make -C release test lint              # exit 0
make -C controller/test/e2e test lint  # exit 0
```

`TestTenantProvisionTimeout` checks 2, 10, 11, 29 and 55 nodes against 45, 45, 46, 64 and 90 minutes.

New unit tests cover the control-plane count on the Forge tenant (`TestTenantControlPlaneNodes`), the VIP rule (`TestControlPlaneVIP`), the refusal on other providers (`TestControlPlaneNodesOnForge`), the site VIP in the Forge environment file and a negative count in the policy.

`qualify plan` for the scopes full, dsx and dsx-gb300 prints the same plan on this branch and on main, so the nine other streams are unchanged.

Live run with an earlier build of the control-plane count and VIP: `qualify local --scope perf` on our az41 Forge site, perf stream set to three control-plane nodes, one worker, one monitoring node and a VIP from the site's kube-vip range. All three control-plane nodes joined, and 53 of 53 suite specs passed. One control-plane machine hung in a Forge boot loop and joined after a Forge reboot; nothing in this change touches boot.

No run at the full size yet. A full-size run needs the site changes under Rollout notes.

`make preflight` was not run for this change, only the commands above.

## Risk Assessment

- [ ] **Low**: Isolated change, well-tested, easy to revert
- [x] **Medium**: Touches multiple components or has broader impact
- [ ] **High**: Breaking change, affects critical paths, or complex rollout

**Rollout notes:** in this order, before this merges.

1. Give the perf site 56 free machines of the instance type in `FORGE_PERF_INSTANCE_TYPE_CPU_ID`: the site node, three control-plane nodes, two monitoring nodes and 50 workers. Today's perf site has fewer, so every `FORGE_PERF_*` variable and the perf jump host secret move to our az33 site.
2. Both GitHub environments that perf runs read get the same values: `forge` for hand-started runs and `forge-nightly` for runs on beta tags.
3. Both also get a control-plane VIP in `FORGE_PERF_CONTROL_PLANE_VIP`, an address that is free on that site. With three control-plane nodes and no VIP, a run stops before it takes a machine.
4. `NVKE_PERF_WEEKDAYS` stays unset until one hand-started run at this size passes.

Perf job timeout becomes 585 minutes, 400 for the suite plus 185 for setup and cleanup. Every other stream keeps its shape, its 45-minute waits and its timeouts.

## Checklist

- [x] I am familiar with the [Contributing Guidelines](https://github.com/dsx-ai-factory/nvke/blob/main/CONTRIBUTING.md)
- [x] Every commit carries a DCO sign-off (`git commit -s`)
- [ ] `make preflight` passes locally
- [x] I did not skip/disable tests to make CI green
- [x] I added/updated tests for new functionality
- [x] I updated docs if user-facing behavior changed
- [ ] I regenerated generated output rather than editing it by hand (if applicable)
- [x] I disclosed above if a substantial portion of this change was AI-generated

A substantial portion of this change was written with AI assistance. Gate results are from this branch; the live run used an earlier build of the control-plane count and VIP.

Signed-off-by: Ganesh Reddy <gputta@nvidia.com>
2026-12-01 13:53:49 -06:00

12 KiB

Declaring infrastructure

An environment file describes hardware that exists. A qualification run names one, asks it for a machine with certain capabilities, and gets back an instance type the site actually offers.

Read this before adding a site, adding an instance type, or adding a second provider. hardware-qualification-design.md covers what happens after a machine is chosen.

Files live in controller/test/e2e/environments/, one per environment, named by the value of -e2e.environment. There are three: forge.yaml, forge-perf.yaml for the Forge site for performance runs, and dsx.yaml for the DSX datahalls. One file per provider and org: a datahall or site is an entry inside one, not a file of its own, and the perf environment has its own because its site sits in another org.

The shape

Only the top level is common. Everything under infrastructure is the named provider's own vocabulary, passed through the loader undecoded:

provider: forge

infrastructure:          # opaque to the loader; the forge provider decodes it
  org:
    id: "${FORGE_ORG_ID}"
  sites:                 # named for the site, not the role: capabilities choose
    site-1:
      id:            "${FORGE_SITE_ID}"
      vpcID:         "${FORGE_VPC_ID}"
      subnetID:      "${FORGE_SUBNET_ID}"      # this fabric attaches by subnet
      sshKeyGroupID: "${FORGE_SSH_KEY_GROUP_ID}"
      instanceTypes:
        - name: cpu.himem.t1
          id: "${FORGE_INSTANCE_TYPE_CPU_ID}"
          provides: {machineType: cpu, arch: amd64}
        - name: gpu.l40sx8
          id: "${FORGE_INSTANCE_TYPE_GPU_ID}"
          provides: {machineType: gpu, arch: amd64, gpu: l40s}
    site-2:
      id:            "${FORGE_SITE_2_SITE_ID:-}"
      vpcID:         "${FORGE_SITE_2_VPC_ID:-}"
      vpcPrefixID:   "${FORGE_SITE_2_VPC_PREFIX_ID:-}"   # this one attaches by prefix
      sshKeyGroupID: "${FORGE_SITE_2_SSH_KEY_GROUP_ID:-}"
      instanceTypes:
        - name: cpu.arm
          id: "${FORGE_SITE_2_INSTANCE_TYPE_CPU_ARM64_ID:-}"
          provides: {machineType: cpu, arch: arm64}
        - name: gpu.gb200.h05.ibx4.dpux2
          id: "${FORGE_SITE_2_INSTANCE_TYPE_GPU_GB200_ID:-}"
          provides: {machineType: gpu, arch: arm64, gpu: gb200}

That split is the point. A second provider describes its infrastructure in its own terms, with its own field names, and nothing above the provider interface changes. There is no shared schema for it to satisfy.

How a machine gets chosen

A run asks for capabilities, not for a site or an instance type — those are things only the provider knows exist:

-e2e.capabilities gpu=l40s,arch=amd64

MatchInstanceType walks the declared types in order and returns the first whose provides map satisfies every infrastructure capability requested. Three keys are infrastructure and are matched on; anything else in the capability set is ignored here, because it describes the software under test rather than the machine:

Key Meaning
machineType cpu or gpu
arch amd64, arm64
gpu the model, e.g. l40s, gb200

Two consequences worth internalising.

Declaration order is the tie-break, so declare cheapest first. Where several types satisfy a request, the first listed wins.

An empty request matches everything. Asking for nothing is satisfied by every type, so the first declared type wins by default. The Forge lane always passes -e2e.capabilities, built from the arch and gpu of the stream it runs, so this is the shape a hand-run with neither falls back to.

A request nothing satisfies fails rather than falling back. Asking for {gpu: gb200} at a site with no GB200 is an error, not a quiet substitution of an L40. That is correct: the site genuinely cannot host the configuration.

Identifiers, not names

Every field is the identifier the API takes, not the human-facing name. This is a deliberate departure from the original design, which used names and resolved them at run time.

The reason is concrete: two of our sites have a VPC of the same name, and they are different VPCs. A VPC name is unique per site rather than per org, so name-based lookup is ambiguous in exactly the case we would hit. Using identifiers also removes a resolution API call from the hot path of every run.

Where the identifiers come from

Not from the file. Every ${NAME} above is read from the process environment when the environment loads.

A plain ${NAME} is required: unset or empty fails the run before anything is created, and every missing name is reported at once. ${NAME:-} defaults to empty instead, which is why site-2's identifiers take that form. A site missing any of them does not validate, and Resolve skips it rather than failing, so a repository that has not onboarded site-2 still runs against site-1. Set them to qualify at site-2.

CI supplies them from repository variables, which is the same route FORGE_TELEPORT_PROXY and FORGE_TELEPORT_JOIN_TOKEN take -- the latter names a Teleport provision-token resource rather than being a credential itself, so a variable is enough. FORGE_JUMP_HOST is a secret instead, so the job log masks it, and it is scoped to the forge GitHub environment rather than the repository, alongside FORGE_API_KEY and FORGE_SITE_2_JUMP_HOST.

The split is between engineering and account. Which sites exist, which machine shapes they offer, and what those shapes provides is engineering: it is reviewed, it explains why a run matched the machine it did, and it belongs in the file. An org, site, VPC or subnet id is not — it names one organization's real infrastructure, and this repository is the staging ground for a public one.

To run against the site from a laptop, export the variables first:

export FORGE_ORG_ID=… FORGE_SITE_ID=… FORGE_VPC_ID=… FORGE_SUBNET_ID=…
export FORGE_SSH_KEY_GROUP_ID=… FORGE_INSTANCE_TYPE_CPU_ID=… FORGE_INSTANCE_TYPE_GPU_ID=…

Their values are on the repository's Actions variables page. Unit tests need none of this: they substitute synthetic values, so TestCheckedInEnvironmentsParse still checks that this file is well-formed wherever it runs.

For forge-perf.yaml, where FORGE_PERF_INSTANCE_TYPE_CPU_ID is the id of the high memory CPU type cpu.himem.t1. A Forge API key belongs to an org, so this file sets apiKeyEnv: FORGE_PERF_API_KEY and the suite reads the key from that variable. A Forge environment that sets none reads FORGE_API_KEY.

export FORGE_PERF_ORG_ID=… FORGE_PERF_SITE_ID=… FORGE_PERF_VPC_ID=… FORGE_PERF_SUBNET_ID=…
export FORGE_PERF_SSH_KEY_GROUP_ID=… FORGE_PERF_JUMP_HOST=… FORGE_PERF_TELEPORT_LOGIN=…
export FORGE_PERF_INSTANCE_TYPE_CPU_ID=… FORGE_PERF_CONTROL_PLANE_VIP=…

What is deliberately absent

Credentials. The Forge API key is a workflow secret, read from the environment and never written to this file, a values file, or a command line. The Teleport join token is a variable, not a secret -- it only names a Teleport provision-token resource; the actual credential is the job's GitHub OIDC token, which Teleport validates server-side.

The jump host. It is a workflow secret rather than a declared field, so the access path is not published alongside the site, and not a repository variable like the org, site, VPC and subnet identifiers -- GitHub prints job-level env in every step's log header, and only a secret is masked there. Keeping them as ${NAME} references rather than literals was raised in review and settled deliberately; a site added later declares its own references under sites: and the variable list grows with it.

The org's human-facing name. Recorded in a comment. The field lands when something reads it, rather than being accepted and silently dropped by a decoder that ignores unknown keys.

What a key group does not give you

sshKeyGroupID governs Serial-over-LAN console access, not authorized_keys. It grants no shell on a node.

Shell access comes from the ed25519 keypair the run generates per provision and injects through cloud-init, reached through the jump host. The key group is what lets you open a console on a node that is not answering ssh — invaluable when triaging, and useless for anything the harness does normally.

When the file changes

Only when the hardware does. A run needing a different Kubernetes version or a different OS image touches nothing here; neither is an infrastructure input. Those arrive as -e2e.versions.

Adding a site

One thing will stop you, and it is worth knowing before you start.

Network attachment differs by site. A fabric attaches an interface by subnet or by VPC prefix, never both, and which one is a property of the fabric rather than a choice. A site declares subnetID or vpcPrefixID accordingly, and declaring both is rejected on lookup. site-1 attaches by subnet, site-2 by prefix. A DSX datahall whose hosts have no managed DPU has neither: its VPC is FLAT, so it declares autoNetwork: true and NiCO attaches each instance itself, the tenant's machines included.

Enumerating instance types is awkward. A Forge instance-type list caps at twenty rows and ignores every filter, so discovering the rest means reading them by id. forge.yaml declares only the two types that have actually carried a workload, rather than everything the site offers.

Adding a provider

A second provider is a second implementation of infra.Provider plus an environment file in its own vocabulary. Nothing above that interface changes, and there is no schema to agree on — the loader only reads provider and hands the rest over.

dsx.yaml is the worked example, and it is worth reading beside forge.yaml for how little the two have in common below provider::

provider: dsx

infrastructure:
  org:
    id: "${DSX_ORG_ID:-ncx}"          # a name, where Forge's is numeric
  sites:
    datahall-1:                       # generic; `api` carries the host
      api:         "${DSX_DATAHALL_1_API:-}"
      id:          "${DSX_DATAHALL_1_SITE_ID:-}"
      tenantID:    "${DSX_DATAHALL_1_TENANT_ID:-}"   # no Forge equivalent
      vpcPrefixID: "${DSX_DATAHALL_1_VPC_PREFIX_ID:-}"
      instanceTypes:
        - name: datahall-1-nvke-tenant
          id: "${DSX_DATAHALL_1_INSTANCE_TYPE_ID:-}"
          provides: {machineType: gpu, arch: amd64}

Three differences are load-bearing rather than cosmetic.

Each datahall declares its own API host. api is required and there is no site-lookup call the way Forge needs one — the host addresses the datahall directly. The key itself is generic, as forge.yaml's site-1 and site-2 are, so which datahall this is stays in a variable. Two datahalls at one site hold completely disjoint UUIDs for the same kinds of object, and nothing in a response says which one an id came from — so a second datahall is a second key, never a reused one.

Credentials are per datahall. The names are derived from the key: DSX_<DATAHALL>_SSA_CLIENT_ID and _SECRET, exchanged for a bearer token at the issuer in SSA_ISSUER. A client scoped to one datahall cannot be picked up by a run against another, and a second datahall needs no code. A datahall that mints elsewhere names the path on its own API host with issuerPath, such as a Keycloak realm's /realms/<realm>/protocol/openid-connect, and one whose API is served under a private CA supplies the PEM as DSX_<DATAHALL>_CA_CERT.

full runs, and picks its own tenant. Every stage runs on DSX: the datahall has its own tenant spec, so a full run builds the site and then a control plane and worker on it. The site lane registers one tenant entry per dialect and each decodes the environment strictly, so the lane excludes the entries belonging to other providers by label --- site-controller && !nico-forge here --- rather than requiring its own, which would also drop every site-level spec. A provider added later needs an exclusion on the other lanes as well as its own; the mapping is one case block in resolve_capabilities in release/hack/qualify-e2e.sh.

Capability matching is the provider's job rather than generic code, which is what makes this work: a provider that has no concept of an "instance type" is free to match a request however it likes.