Contributing to kslip
Contributions of every kind are welcome: bug reports, design discussion, documentation, tests and code.
Everyone taking part follows the code of conduct. Report security problems privately, as described in the security policy, and never in a public issue.
Reporting bugs and proposing changes
Section titled “Reporting bugs and proposing changes”Search the existing issues first. If none covers your case, open one with the matching issue template.
Discuss a large change in an issue before writing it. An agreed design saves a rewrite in review.
Making a change
Section titled “Making a change”- Fork the repository and create a branch.
- Set up your environment as described in docs/development.md.
- Make the change, following the standards below.
- Run
make verifyuntil it passes. - Open a pull request and fill in the template. Continuous integration runs
make verifyand the end-to-end tests on it.
A maintainer reviews every pull request. Changes merge once a maintainer approves and the checks pass. GOVERNANCE.md describes how decisions are made.
Change standards
Section titled “Change standards”Every change is complete
Section titled “Every change is complete”A commit leaves the project in a finished state for the scope it covers. It carries, together:
- the code;
- tests that exercise it;
- documentation that describes it;
- sample manifests and Helm chart updates, when the change affects them.
Do not merge partial work to be finished by a later change. Split large work into changes that are each complete, where each one adds scope to the last.
API fields ship with their behavior
Section titled “API fields ship with their behavior”A field, flag or chart value is added in the same change as the behavior behind it. Nothing in an API is reserved for later use.
Commit messages
Section titled “Commit messages”- Write the subject in the imperative mood, 72 characters or fewer, describing
what the change does:
Add leader election to the controller manager. - Use the body to explain why the change is made and anything a reader of the code cannot infer from it.
- Sign off every commit, as described under Developer Certificate of Origin.
- Follow the conventions of the surrounding code.
make lintenforces formatting and the linters in.golangci.yml. - Handle or return every error.
- Write comments that explain why the code is the way it is. A comment describes the code as it stands.
Documentation standards
Section titled “Documentation standards”Documentation describes the system as it is. A reader at any commit learns what kslip does at that commit, and nothing else.
- Write in the present tense.
- Describe behavior that exists. Leave out intentions, plans and anything that depends on a later change.
- Leave out dates, release timing and project status.
- State a limitation as a fact about the system: “Metrics are served over HTTPS only.”
- Keep history out of the documentation. Git records what changed and when.
- Leave no markers for unfinished work in any file.
These standards cover every Markdown file (except CHANGELOG.md,
which records release history) and the comments on API types, which become
reference documentation. make verify-docs checks them.
Developer Certificate of Origin
Section titled “Developer Certificate of Origin”kslip requires the Developer Certificate of Origin (DCO) on every commit. By signing off, you certify that you wrote the change or otherwise have the right to submit it under the project’s license.
Sign off by adding a Signed-off-by line with your name and email address to
the commit message. Git adds it for you:
git commit --signoffPull requests with unsigned commits are not merged.