-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed docs/developer-guide.md to docs/CONTRIBUTING.md (#353)
Added Pull Request, Code Review and Best Practices sections to CONTRIBUTING.md Added examples for running and excluding tests matching a regex - Note, the CONTRIBUTING.MD is referenced in the github checks under the DCO details link Signed-off-by: Eran Cohen <[email protected]>
- Loading branch information
Showing
5 changed files
with
74 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Design | ||
|
||
The system is implemented as an k8s operator using the [operator-sdk](https://github.com/operator-framework/operator-sdk) | ||
but is deployed as a DaemonSet instead of Deployment with [filtering](https://github.com/operator-framework/operator-sdk/blob/master/doc/user/event-filtering.md) only events for the DaemonSet pod node. | ||
|
||
There are two controllers one for [Node](https://godoc.org/k8s.io/api/core/v1#Node) | ||
and the other for the CRD NodeNeworkState. | ||
|
||
## Components | ||
|
||
- [Node Controller](docs/developer-guide-node.md) - developer guide and design of `Node` handler. | ||
- [NodeNetworkState Controller](docs/developer-guide-state.md) - developer guide and design of `NodeNetworkState` handler. | ||
- [NodeNetworkConfigurationPolicy Controller](docs/developer-guide-policy.md) - developer guide and design of `NodeNetworkConfigurationPolicy` handler. | ||
|
||
# Development | ||
|
||
[Development guide](docs/developer-guide-commands.md) is a go-to reference point for | ||
development helper commands, building, testing, container images and local | ||
cluster. | ||
|
||
# Open a Pull Request | ||
Kubernetes-nmstate generally follows the [standard github pull request process](https://gist.github.com/Chaser324/ce0505fbed06b947d962), but there is a layer of additional specific differences: | ||
|
||
The first difference you'll see is that a bot will begin applying structured labels to your PR. | ||
|
||
The bot may also make some helpful suggestions for commands to run in your PR to facilitate review. | ||
These /command options can be entered in comments to trigger auto-labeling and notifications. Refer to its command reference documentation. | ||
|
||
Common new contributor PR issues are: | ||
|
||
Missing DCO sign-off: | ||
Developers Certificate of Origin (DCO) Sign-off is a requirement for getting patches into the project (see [Developers Certificate of Origin](https://developercertificate.org/)). | ||
You can "sign" this certificate by including a line in the git commit of "Signed-off-by: Legal Name <email-address>". | ||
If you forgot to add the sign-off, you can also amend your commit with the sign-off: | ||
`git commit --amend -s`. | ||
|
||
## Code Review | ||
|
||
To make it easier for your PR to receive reviews, consider the reviewers will need you to: | ||
|
||
- Follow the project [coding conventions](https://github.com/golang/go/wiki/CodeReviewComments). | ||
- Write [good commit messages](https://chris.beams.io/posts/git-commit/). | ||
- Break large changes into a logical series of smaller patches which individually make easily understandable changes, and in aggregate solve a broader issue. | ||
|
||
## Best Practices | ||
|
||
- Write clear and meaningful git commit messages. | ||
- If the PR will *completely* fix a specific issue, include `fixes #123` in the PR body (where 123 is the specific issue number the PR will fix. This will automatically close the issue when the PR is merged. | ||
- Make sure you don't include `@mentions` or `fixes` keywords in your git commit messages. These should be included in the PR body instead. | ||
- When you make a PR for small change (such as fixing a typo, style change, or grammar fix), please squash your commits so that we can maintain a cleaner git history. | ||
- Make sure you include a clear and detailed PR description explaining the reasons for the changes, and ensuring there is sufficient information for the reviewer to understand your PR. | ||
|
||
# Releasing | ||
|
||
To cut a release, push images to quay and publish it on GitHub | ||
the command `make release` do all this automatically, the version is at | ||
`version/version.go` and the description at `version/description`. | ||
|
||
So the step would be: | ||
- Change version/version.go and versions/description | ||
- Create a PR to review it | ||
- Merge it to master | ||
- Call `make release` from master | ||
|
||
The environment variable GITHUB_TOKEN is needed to publish at GitHub and it must | ||
point to a token generated by github to access projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.