gpu-operator
AGENTS.md2.9k starsChanged 3 months agoApache-2.0View on GitHub
Guidance for AI coding agents working in this repository. Human contributors should also read CONTRIBUTING.md and the documentation site which are the source of truth. The NVIDIA GPU Operator is a Kubernetes operator (built with Kubebuilder v3) that automates the management of all NVIDIA software components needed to provision GPU nodes in a Kubernetes cluster. These components include the NVIDIA drivers (to enable CUDA), Kubernetes Device Plugin for NVIDIA GPUs, the NVIDIA Container Toolkit, GFD for node labeling, DCGM based…
Trending
Quiet since May.about the whole repository
Who's talking about NVIDIA/gpu-operator
- gardenlinux/gardenlinux“GPU Support”GitHub · Apr 24, 2020 · 3 reactions
- kubernetes-sigs/kubespray“update containerd.options key name”GitHub · Apr 27, 2025 · 2 reactions
- kubeflow/pipelines“[backend] Intermittent Failures of GPU-Enabled KFP Tasks with Exit Code 255 in Init Phase”GitHub · Jan 11, 2024 · 2 reactions
- so1s/so1s-infra“SO1S-434 Containerd GPU 연동 트러블슈팅”GitHub · Oct 16, 2022 · 2 reactions
- k3s-io/k3s“support for oci-runtime drop-ins”GitHub · Feb 12, 2021 · 2 reactions
The biggest 5 of 16 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 16
Talked about on GitHub and Bluesky (16 times).
On GitHub · 15
- Apr 24, 2020GPU Support — gardenlinux/gardenlinux3 reactions · 3 comments
- Apr 27, 2025update containerd.options key name — kubernetes-sigs/kubespray2 reactions · 11 comments
- Jan 11, 2024[backend] Intermittent Failures of GPU-Enabled KFP Tasks with Exit Code 255 in Init Phase — kubeflow/pipelines2 reactions · 7 comments
- Oct 16, 2022SO1S-434 Containerd GPU 연동 트러블슈팅 — so1s/so1s-infra2 reactions · 4 comments
- Feb 12, 2021support for oci-runtime drop-ins — k3s-io/k3s2 reactions · 1 comment
10 more on GitHub
- May 12, 2026Track upstream gaps for NVIDIA vGPU SR-IOV ("vendor-specific VFIO framework") support — cozystack/cozystack1 reaction · 2 comments
- Feb 20, 2026feat(helm) add support for extra manifests and annotation on pvc — vllm-project/production-stack1 reaction · 1 comment
- Feb 19, 2026Fabric Manager shared-nvswitch virtualization model support — NVIDIA/kubevirt-gpu-device-plugin1 reaction · 6 comments
- Oct 31, 2025NVIDIA gpu operator, dra driver, k8s-device-plugin — pacoxu/AI-Infra1 reaction · 1 comment
- Oct 15, 2025Bump NVIDIA GPU operator to 25.3 — rh-ecosystem-edge/nvidia-ci1 reaction · 3 comments
- Mar 5, 2025[Feature] Add device filter for selecting or excluding a subset of devices — NVIDIA/k8s-device-plugin1 reaction · 6 comments
- Jan 30, 2025Several Issues and Errors in building pre-compiled driver image for Ubuntu 22.04 — NVIDIA/gpu-driver-container1 reaction · 1 comment
- Nov 28, 2024Replace `CONTAINER_DRIVER_ROOT` with `DRIVER_ROOT_CTR_PATH` — kubernetes-sigs/dra-driver-nvidia-gpu1 reaction
- Nov 19, 2024gpu-operator on talos 1.9 alpha — siderolabs/extensions1 reaction · 4 comments
- Dec 22, 2023Problem's enabling GPU - Workaround included — canonical/microk8s-core-addons1 reaction · 2 comments
On Bluesky · 1
- May 7, 2026gpu-operator (⭐️ 2678) NVIDIA GPU Operator creates, configures, and manages GPUs in Kubernetes #go — @golangoss.bsky.social1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
14 rules. About 1 is common, 6 are distinctive, and 7 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 40
All standard tasks go through the Makefile.
- Very specific: line 60
Always run make fmt and make unit-test before considering Go changes complete.
- Very specific: line 62
After editing anything under api/nvidia, run make generate / make manifests (or at least make validate-generated-assets to confirm nothing …
- Distinctive: line 72
Keep changes scoped to the task.
- Very specific: line 74
Every .go file starts with the Apache-2.0 boilerplate header (hack/boilerplate.go.txt), match the existing header exactly rather than …
- Very specific: line 76
Follow existing patterns in controllers/ and internal/ for logging, error wrapping, and client usage rather than introducing new libraries.
- Distinctive: line 87
When fixing a bug, add a regression test that fails without the fix.
- Very specific: line 94
All commits must be signed off (DCO): git commit -s, producing a trailing Signed-off-by: Name <email> line.
- Distinctive: line 97
Do not open, push to, or comment on GitHub issues/PRs without explicit user confirmation.
- Distinctive: line 98
Keep PR titles short and imperative.
- Common: line 102
Never commit credentials, API keys, tokens, passwords, kubeconfigs, or private keys.
- Very specific: line 103
Do not hand-edit generated files.
- Very specific: line 106
Do not commit built binaries, coverage.out, or anything the .gitignore already excludes.
- Distinctive: line 107
Do not modify CODEOWNERS or GOVERNANCE.md unless the task is explicitly about that.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Guidance for AI coding agents working in this repository. Human contributors should also read CONTRIBUTING.md and the documentation site which are the source of truth.
Project Summary
The NVIDIA GPU Operator is a Kubernetes operator (built with Kubebuilder v3) that automates
the management of all NVIDIA software components needed to provision GPU nodes in a Kubernetes
cluster. These components include the NVIDIA drivers (to enable CUDA), Kubernetes Device Plugin
for NVIDIA GPUs, the NVIDIA Container Toolkit, GFD for node labeling, DCGM based monitoring and
others. The NVIDIA GPU Operator manages several CRDs, defined in PROJECT:
ClusterPolicy(api/v1) — a singleton CRD describing the entire GPU software stack; uses the Kubernetes Device Plugin framework for allocating GPUs.GPUCluster(api/v1alpha1) — a singleton CRD describing the entire GPU software stack; uses Dynamic Resource Allocation for allocating GPUs; an alternative to theClusterPolicyCRD.NVIDIADriver(api/v1alpha1) — per-node-pool NVIDIA driver configuration.
Repository layout
api/— CRD Go types (nvidia/for the API groups,versioned/generated clientset).controllers/— reconciliation logic for each CRD/controller;object_controls.go,state_manager.go, andresource_manager.gocontain helpers that render and apply the k8s objects that make up each operand "state."internal/— supporting packages; notablyinternal/stateis used for state rendering.cmd/— binary entrypoints (operator manager and CLI tools).deployments/gpu-operator/— Helm chart for the operator.assets/state-*— per-operand manifests rendered by theClusterPolicystate manager.manifests/— per-operand manifests rendered by theGPUCluster/NVIDIADriverstate managers.config/— kubebuilder scaffolding and generated manifests (i.e. CRDs, RBAC).bundle/— OLM bundle for distributing the operator to the OpenShift operator catalog.tests/— end-to-end test scripts; used to install / test gpu-operator on a real Kubernetes cluster.hack/— dev scripts (boilerplate license header, must-gather, environment prep).tools/— miscellaneous tooling used bymake.
Build, test, and lint
All standard tasks go through the Makefile. Prefer make targets over invoking tools directly so CI and local runs stay consistent.
make build/make cmds— compile the operator binaries.make unit-test— run unit tests (excludestests/e2e).make lint— rungolangci-lint run ./...(config in.golangci.yml).make fmt— checkgofmt -sformatting (diff only, does not write).make goimports— rungoimports -local github.com/NVIDIA/gpu-operator -w(writes files).make generate/make manifests— regenerate deepcopy code and CRD/RBAC manifests from kubebuilder markers after changingapi/types; run these after editing*_types.gofiles.make sync-crds— copy generated CRDs inconfig/crd/bases/*to helm chart and OLM bundle.make validate-generated-assets— verifies generated manifests/clientset/CRDs are up to date; CI will fail if generated output is stale, so run this (orgenerate+manifests+generate-clientset+sync-crds) after touching API types or Helm chart CRDs.make validate-helm-values— verifies that images referenced in helm values are valid; requires thehelmbinary.make validate-csv— validates that the CSV file in the OLM bundle directory is properly formatted and all image references are valid.make check-third-party-notices— checks whetherTHIRD_PARTY_NOTICES.mdis up-to-date.
Always run make fmt and make unit-test before considering Go changes complete.
After editing anything under api/nvidia, run make generate / make manifests (or at least
make validate-generated-assets to confirm nothing is stale) and commit the regenerated output
alongside the source change. If any CRDs were modified, run make sync-crds to make sure
the CRDs in the helm chart and OLM bundle are in-sync.
Coding Conventions
- Idiomatic Go, client-go/controller conventions. Controllers and reconcile-style loops must be idempotent and safe under retries.
- Comments explain why, not what. Identifier names should carry the "what."
- Keep changes scoped to the task. No drive-by refactors, speculative abstractions, or unrelated formatting churn — one concern per PR.
- Every
.gofile starts with the Apache-2.0 boilerplate header (hack/boilerplate.go.txt), match the existing header exactly rather than inventing a variant.make license-checkverifies this. - Follow existing patterns in
controllers/andinternal/for logging, error wrapping, and client usage rather than introducing new libraries. - Vendor directory (
vendor/) is checked in; rungo mod tidy/go mod vendorafter dependency changes and do not hand-edit vendored code. zz_generated.deepcopy.gofiles are generated; do not hand-edit them.
Testing Conventions
- Unit tests are co-located
*_test.gofiles usingtestify(require/assert), typically table-driven with amap[string]struct{...}of cases andt.Run(name, ...). Run viamake unit-test. New behavior needs appropriate test coverage. - When fixing a bug, add a regression test that fails without the fix.
Contribution process (see CONTRIBUTING.md)
- For any significant change (architectural change, new feature, breaking change, non-trivial bug fix), an issue should exist describing the problem/proposal before implementation begins — check for or ask about a linked issue rather than assuming a PR alone is sufficient.
- All commits must be signed off (DCO):
git commit -s, producing a trailingSigned-off-by: Name <email>line. Do not fabricate a sign-off identity — use the configured git user's identity. - Do not open, push to, or comment on GitHub issues/PRs without explicit user confirmation.
- Keep PR titles short and imperative; the body should explain motivation ("why"), not just restate the diff.
Things to avoid
- Never commit credentials, API keys, tokens, passwords, kubeconfigs, or private keys.
- Do not hand-edit generated files. Run
make generate/make manifeststo regenerate deepcopy code and CRD/RBAC manifests from kubebuilder markers after changingapi/types. Rungo mod tidy/go mod vendorafter dependency changes and do not hand-edit vendored code. - Do not commit built binaries,
coverage.out, or anything the .gitignore already excludes. - Do not modify CODEOWNERS or GOVERNANCE.md unless the task is explicitly about that.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

