Welcome to the Kepler community and thank you for contributing to Kepler! May this guide help you with your 1st contribution.
There are multiple ways to contribute, including new feature requests and implementations, bug reports and fixes, PR reviews, doc updates, refactoring, unit and integration tests, web design, etc.
- Before opening a new issue or PR, search for any existing issues here to avoid duplication.
- For any code contribution, please read the documents below carefully:
If you are good with our License and DCO, follow these steps to start with your 1st code contribution:
- Fork & clone Kepler
- We use ginkgo as a test framework. Please add units tests that cover your code changes.
- For any new feature design, or feature level changes, please create an issue 1st, then submit a PR following document and steps here before code implementation.
Once you are ready to start working on an issue, follow the steps to set up your local development environment.
Here is a checklist for when you are ready to open a Pull Request:
- Add unit tests that cover your changes
- Ensure that all unit tests are successful
- Run the integration tests locally
- Sign your commits
- Format your commit messages
Once a PR is open, Kepler reviewers will review the PR. Thank you for contributing to Kepler!
To set up a development environment, please follow the steps here.
The Kepler CI tests perform the following checks:
We run Go tests based on specific build tags for different conditions. Please don't break other build tags, otherwise CI may fail.
To run the unit tests:
make test
Integration tests should be based on the minimal scope of a unit test needed to succeeded.
The GitHub Actions workflow for integration tests and in-depth steps can be found here. The end-to-end testing suite can be found here.
The logic is as follows:
- Ensure Kepler requirements are met e.g. kernel headers are installed.
- Download required tools, such as kubectl.
- Build kepler image with specific PR code.
Based on different k8s cluster, for example, kind:
- Start kind cluster locally with a local image registry.
- Upload kepler image build by specific PR code to local image registry for kind cluster.
Back to common checking process:
- Deploy Kepler to a local kind cluster with image stored at local image registry.
- Use kubectl to check that the change was applied as intended.
steps:
go test -cpuprofile cpu.prof -memprofile mem.prof -bench .
pprof -http=":8091" ./cpu.prof
ref https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast
Please sign and commit your changes with git commit -s
. More information on
how to sign commits can be found
here.
Please refer to the Kubernetes commit message guidelines that can be found here.
We have 3 rules as commit messages check to ensure a commit message is meaningful:
- Try to keep the subject line to 50 characters or less; do not exceed 72 characters
- Providing additional context with the following formatting:
<topic>: <something>
- The first word in the commit message subject should be capitalized unless it starts with a lowercase symbol or other identifier
For example:
Doc: update Developer.md
We enabled stale bot for house keeping. An Issue or Pull Request becomes stale if no any inactivity for 60 days.