Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,51 @@ NVIDIA is willing to work with partners for adding platform support for the GPU

To file feature requests, bugs, or questions, submit an issue at https://github.com/NVIDIA/gpu-operator/issues

To contribute to the project, file a Pull Request at https://github.com/NVIDIA/gpu-operator/pulls. Contributions do not require explicit contributor license agreements (CLA), but we expect contributors to sign their work.
To contribute to the project, file a Pull Request at https://github.com/NVIDIA/gpu-operator/pulls. Contributions do not require explicit contributor license agreements (CLA), but we expect contributors to [sign](#signing) their work.

Before beginning implementation or opening a Pull Request for a significant change, first open an issue describing the problem or proposal.
A significant change includes, but is not limited to, architectural changes, new features, breaking changes to API or behavior, and non-trivial bug fixes.

Reviewers are automatically assigned to Pull Requests from the [OWNERS](CODEOWNERS) file.
The approval / decision-making process is documented in [GOVERNANCE.md](GOVERNANCE.md)

All contributions must adhere to the [Code of Conduct](CODE_OF_CONDUCT.md).

## Development Environment Setup

### Prerequisites
* [Go](https://go.dev/doc/install) (see `go.mod` for the minimum required version)
* [Docker](https://docs.docker.com/get-docker/) (for building container images)
* [Helm v3](https://helm.sh/docs/intro/install/) (for rendering and/or installing the Helm chart)
* [golangci-lint](https://golangci-lint.run/docs/welcome/install/) (for running `make lint`)

Install additional development tools by running `make install-tools`.

### Common make targets
```console
make build # compile
make cmds # build all Go executables
make build-image # build the gpu-operator container image

make unit-test # run unit tests
make fmt # apply gofmt to codebase
make goimports # apply goimports to the codebase
make lint # lint codebase with golangci-lint

make validate-generated-assets # validate all generated code / assets are up-to-date

make manifests # generate CRDs/RBAC from kubebuilder markers
make generate # generate zz_generated.deepcopy.go
make generate-clientsets # generate clientsets for APIs
make sync-crds # copy generated CRDs in config/crd/bases/* to helm chart and OLM bundle

make validate-helm-values # verify that images referenced in helm values are valid
make validate-csv # verify that images referenced in the OLM bundle's CSV file are valid

make validate-modules # verify that go.mod and go.sum are up-to-date
make check-third-party-notices # verify that `THIRD_PARTY_NOTICES.md` is up-to-date
```

## <a name="signing"></a>Signing your work

Want to hack on the NVIDIA GPU Operator? Awesome!
Expand Down
3 changes: 2 additions & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.26.0
require (
github.com/google/go-licenses/v2 v2.0.1
github.com/jandelgado/gcov2lcov v1.1.1
golang.org/x/tools v0.49.0
k8s.io/code-generator v0.37.0
sigs.k8s.io/controller-tools v0.22.0
sigs.k8s.io/kustomize/kustomize/v5 v5.8.1
Expand Down Expand Up @@ -55,8 +56,8 @@ require (
golang.org/x/net v0.58.0 // indirect
golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 // indirect
golang.org/x/text v0.41.0 // indirect
golang.org/x/tools v0.49.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
Expand Down
2 changes: 2 additions & 0 deletions tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 h1:ZUSxONxc981v7AW7QUg+I9WwZzSTTJ019ENBYr5pV/Q=
golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5/go.mod h1:LVehoXe41cL5SCVQilsV7Gg6BNG+Js6P9PhSbYTIUkQ=
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
1 change: 1 addition & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package tools
import (
_ "github.com/google/go-licenses/v2"
_ "github.com/jandelgado/gcov2lcov"
_ "golang.org/x/tools/cmd/goimports"
_ "k8s.io/code-generator/cmd/client-gen"
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
_ "sigs.k8s.io/kustomize/kustomize/v5"
Expand Down
Loading