Skip to content

Commit

Permalink
Add steps to fork and clone, tests, travis, API changes etc
Browse files Browse the repository at this point in the history
  • Loading branch information
barney-s committed Feb 13, 2020
1 parent 06383a8 commit a9fdd6a
Showing 1 changed file with 58 additions and 10 deletions.
68 changes: 58 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,69 @@

## Sign the CLA

Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests. Please see https://git.k8s.io/community/CLA.md for more info
Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests.

## Contributing A Patch
Please see https://git.k8s.io/community/CLA.md for more info

## Prerequisites
- [go](https://golang.org/dl/) version v1.13+.
- [docker](https://docs.docker.com/install/) version 17.03+.
- make
- Access to a Kubernetes v1.11.3+ cluster.

## Other tools
This repo uses other tools for development, building and testing.
The tools can be installed using `make install-tools`
- controller-gen
- golangci-lint
- mockgen
- conversion-gen
- kubebuilder
- kustomize
- addlicense
- misspell
- kind

## Contributing

### Fork and clone the repo

1. Goto [Application Repo](https://github.com/kubernetes-sigs/application) and fork it
1. Clone your fork locally `git clone git@github.com:<user>/application.git $GOPATH/src/sigs.k8s.io/kubebuilder`
1. Change the working directory to the clone `cd $GOPATH/src/sigs.k8s.io/kubebuilder`
1. Run `make` to run unit tests and build the binary

### Contributing A Patch

1. Submit an issue describing your proposed change to the repo in question.
1. The [repo owners](OWNERS) will respond to your issue promptly.
1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above).
1. Fork the desired repo, develop and test your code changes.
1. Develop and test your code changes.
1. Submit a pull request.
1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above).

### How to test locally

1. Run the tests by using the command `make test`. It will execute unit tests.
1. Run the e2e tests by running `make e2e-test`. It uses kind to spin up a local cluster for testing.

### CI Tests

See [Travis](.travis.yml) file to check the travis tests. It is setup to run for all pull requests.
In the Pull request check the CI job `continuous-integration/travis-ci/pr` and click on `Details`.

### Changing API

This project uses and is built with [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder).
To regenerate code after changes to the [Application CRD](pkg/apis/app/v1beta1/application_types.go), run `make generate`. Typically `make all` would take care of it. Make sure you add enough [tests](pkg/apis/app/v1beta1/application_types_test.go). Update the [example](docs/examples/example.yaml)

## Community, discussion and support

Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).

You can reach the maintainers of this project at:

### Code Generation
- [SIG APPS](https://github.com/kubernetes/community/tree/master/sig-apps)

This project uses and is built with [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder). Kubebuilder does generates some of the code. Prior to submitting a pull request please check that you are not altering generated code and check if you need to regenerated code due to your change.
## Code of conduct

1. Make changes to the [Application CRD](pkg/apis/app/v1beta1/application_types.go).
1. Add [tests](pkg/apis/app/v1beta1/application_types_test.go).
1. Regenerate the generated code using `kubebuilder generate`.
1. Update the [example](docs/examples/example.yaml)
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).

0 comments on commit a9fdd6a

Please sign in to comment.