agentleFS
NVIDIAKnown publisherNVIDIA/gpu-operator/AGENTS.md

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

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA/gpu-operator repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about NVIDIA/gpu-operator

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

10 more on GitHub

On Bluesky · 1

  • 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
  1. Distinctive:

    All standard tasks go through the Makefile.

    line 40
  2. Very specific:

    Always run make fmt and make unit-test before considering Go changes complete.

    line 60
  3. Very specific:

    After editing anything under api/nvidia, run make generate / make manifests (or at least make validate-generated-assets to confirm nothing …

    line 62
  4. Distinctive:

    Keep changes scoped to the task.

    line 72
  5. Very specific:

    Every .go file starts with the Apache-2.0 boilerplate header (hack/boilerplate.go.txt), match the existing header exactly rather than …

    line 74
  6. Very specific:

    Follow existing patterns in controllers/ and internal/ for logging, error wrapping, and client usage rather than introducing new libraries.

    line 76
  7. Distinctive:

    When fixing a bug, add a regression test that fails without the fix.

    line 87
  8. Very specific:

    All commits must be signed off (DCO): git commit -s, producing a trailing Signed-off-by: Name <email> line.

    line 94
  9. Distinctive:

    Do not open, push to, or comment on GitHub issues/PRs without explicit user confirmation.

    line 97
  10. Distinctive:

    Keep PR titles short and imperative.

    line 98
  11. Common:

    Never commit credentials, API keys, tokens, passwords, kubeconfigs, or private keys.

    line 102
  12. Very specific:

    Do not hand-edit generated files.

    line 103
  13. Very specific:

    Do not commit built binaries, coverage.out, or anything the .gitignore already excludes.

    line 106
  14. Distinctive:

    Do not modify CODEOWNERS or GOVERNANCE.md unless the task is explicitly about that.

    line 107

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 the ClusterPolicy CRD.
  • 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, and resource_manager.go contain helpers that render and apply the k8s objects that make up each operand "state."
  • internal/ — supporting packages; notably internal/state is 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 the ClusterPolicy state manager.
  • manifests/ — per-operand manifests rendered by the GPUCluster / NVIDIADriver state 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 by make.

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 (excludes tests/e2e).
  • make lint — run golangci-lint run ./... (config in .golangci.yml).
  • make fmt — check gofmt -s formatting (diff only, does not write).
  • make goimports — run goimports -local github.com/NVIDIA/gpu-operator -w (writes files).
  • make generate / make manifests — regenerate deepcopy code and CRD/RBAC manifests from kubebuilder markers after changing api/ types; run these after editing *_types.go files.
  • make sync-crds — copy generated CRDs in config/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 (or generate+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 the helm binary.
  • 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 whether THIRD_PARTY_NOTICES.md is 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 .go file starts with the Apache-2.0 boilerplate header (hack/boilerplate.go.txt), match the existing header exactly rather than inventing a variant. make license-check verifies this.
  • Follow existing patterns in controllers/ and internal/ for logging, error wrapping, and client usage rather than introducing new libraries.
  • Vendor directory (vendor/) is checked in; run go mod tidy/go mod vendor after dependency changes and do not hand-edit vendored code.
  • zz_generated.deepcopy.go files are generated; do not hand-edit them.

Testing Conventions

  • Unit tests are co-located *_test.go files using testify (require/assert), typically table-driven with a map[string]struct{...} of cases and t.Run(name, ...). Run via make 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 trailing Signed-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 manifests to regenerate deepcopy code and CRD/RBAC manifests from kubebuilder markers after changing api/ types. Run go mod tidy/go mod vendor after 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.