Welcome to Kubernetes. We are excited about the prospect of you joining our community! The Kubernetes community abides by the CNCF code of conduct. Here is an excerpt:
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
We have full documentation on how to get started contributing here:
- Contributor License Agreement Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
- Kubernetes Contributor Guide - Main contributor documentation, or you can just jump directly to the contributing section
- Contributor Cheat Sheet - Common resources for existing developers
- Mentoring Initiatives - We have a diverse set of mentorship programs available that are always looking for volunteers!
go generate
- Generates the
wire_gen.go
files
go test ./...
- Test the
golint -min_confidence 0.9 ./...
- Look for errors
go build
- Build the binary
This repo uses Dependency Injection for wiring together the Commands. See the wire tutorial for more on DI.
- Add a new package for your cobra command under
cmd/
- e.g.
kubectl apply status
would be added undercmd/apply/status
- Add it to the parent command
- Copy an existing command as an example
- Add a new package that contains the library for your command under
internal/pkg
- e.g.
kubectl apply status
library would be added underinternal/pkg/status
- Invoke it from the command you added
- Copy an existing package as an example
- Add the DI wiring for your library
- Edit
internal/pkg/wiring/wiring.go
- Add your struct to theProviderSet
list - Edit
internal/pkg/wiring/wire.go
- Add anInitialize
function for you struct
- Add a new package for your library under
pkg
- Add a new package that contains the implementation under
internal/pkg
- Invoke it from your public package