feat(operator): add the AICR Operator and its kind CI lanes #3475
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3475"
general
weight: 0.35
yuanchen8911
Summary
Adds the opt-in AICR Operator accepted in ADR-027: the
operator.aicr.run/v1alpha1API, the controller, its Helm chart, thekubectl aicrplugin and its documentation. It also addsoperator-Make targets and a path-filtered Operator E2E workflow that runs the operator's kind suites.Motivation / Context
ADR-027 brings the day-2 lifecycle (assess, plan, approve, roll out, validate) into the cluster. This PR lands the operator itself; publishing it in AICR's release train is #3469.
Fixes: #3473
Related: #3285
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)cmd/aicr-operator,cmd/kubectl-aicr,api/operator,pkg/operator,charts/aicr-operator,tests/operator,tools/operator-) and its CI (.github/workflows/operator-e2e.yaml,.github/actions/operator-kind)Implementation Notes
Isolation. The operator runs AICR only as pinned images and imports no other AICR package. The
operator-boundarydepguard rule in.golangci.yamldenies everygithub.com/NVIDIA/aicr/import from the operator's trees except their own packages; using any other AICR package needs an explicit allow entry. In the other direction, only the operator's own release tool (tools/operator-release) imports operator packages. The AICR release it runs, and the releases CI tests it against, are pinned underoperator:in.settings.yaml: v1.1.2 by default, with v1.0.0 and v1.1.2 in the CI matrix.Shared files touched:
Makefile: theoperator-*targets;.golangci.yaml: the depguard rule;.settings.yaml: theoperator:pins;.ko.yaml: anaicr-operatorbuild entry, while theaicrimage keeps its defaults;.yamllint.yaml: ignores the chart templates;.gitignore;go.mod: a new direct dependency,aws-sdk-go-v2/service/ecr, for the ECR registry provider, plus several indirect dependencies promoted to direct;DEVELOPMENT.md,.claude/CLAUDE.mdandAGENTS.md.CI (
Operator E2E, not a required check). It runs when operator paths change:operator-e2e,operator-skeletonandoperator-qualifyeach run on their own kind cluster;operator-qualifybuilds two release candidates of the commit, installs one and upgrades to the other mid-rollout.prime-imagesjob loads the registry and Argo CD redis images into the cache the KWOK lanes share (#2483), so the kind jobs do not each pull them from ECR Public, which throttles anonymous pulls per runner IP.The suites install the chart with the commands the docs give users. AICR v1.0.x gets the documented namespace relabel and
--force-conflicts. Adoption flags apply only whenOPERATOR_ADOPT=1is set for local cluster reuse.Docs are in the tree, not yet published.
docs/operatordescribes installing the chart fromoci://ghcr.io/nvidia/charts/aicr-operatorand thekubectl-aicrrelease binaries. No release produces those until #3469, sodocs/index.ymldoes not listdocs/operatoryet; #3469 adds the navigation together with the artifacts.Known gaps, tracked as follow-ups:
operator-check-generatedruns only in Operator E2E, which is not a required check.operator-release pushhas no caller yet; it gains SBOM, signature and provenance publishing with #3469.Testing
Results at this PR's tree, run locally on macOS arm64 with kind (Kubernetes 1.37 unless noted):
| Check | Result |
|---|---|
|
make qualify(clean worktree) | PASS; total coverage 85.6% (floor 83%) ||
make operator-check-generated| PASS ||
make operator-envtest-floor(Kubernetes 1.34) | PASS; fails closed when the floor version is empty or unavailable ||
make operator-e2e, AICR v1.1.2 | PASS ||
make operator-skeleton, AICR v1.0.0 | PASS, 25/25 subtests ||
make operator-qualify, AICR v1.0.0 | PASS, 10/10 subtests ||
make operator-qualify, AICR v1.1.2 | PASS, 10/10 subtests ||
golangci-linton the operator packages | 0 issues; importingpkg/client/v1,pkg/bundler/deployerorpkg/errorsfrompkg/operatorfails theoperator-boundaryrule |Each kind suite ran on a fresh cluster with no adoption flags. The candidate's check that its operator binary refuses development settings runs only on a linux host, so it ran in no local check; the Operator E2E qualify jobs run it. The floor Kubernetes cells and the rest of the AICR × Kubernetes matrix run in Operator E2E on this PR.
Coverage: the new packages have no baseline on
main; per-package numbers come from the coverage report CI posts on this PR.Risk Assessment
The operator is opt-in and isolated: no existing AICR package imports it, and it changes no AICR CLI, API or recipe code. The
go.modchanges add modules and promote indirect ones to direct. The only version change isgomodules.xyz/jsonpatch/v2(v2.4.0 → v2.5.0 in the module graph), and only the operator uses it, through controller-runtime. The size of the change (about 340 files) and the shared build files (Makefile,go.mod,.ko.yaml,.golangci.yaml) are the risk.Rollout notes: N/A. Nothing ships until #3469 adds the operator to the release train.
Checklist
make testwith-race)make lint)git commit -s -S) — GPG signing info