Skip to content

Contributing to kube-router

Summary

This document covers how to contribute to the kube-router project. kube-router uses GitHub pull requests to manage contributions (documentation, bug fixes, features, manifests, etc.).

Please read the User Guide and Developer's Guide for functionality and internals of kube-router.

Getting Help

If you have a question about kube-router or have a problem using it, please start with the #kube-router channel on Kubernetes Slack. If that doesn't answer your question, or if you think you found a bug, please file an issue.

Contributing Changes

Fork and Clone

git clone https://github.com/YOUR_ACCOUNT/kube-router.git
cd kube-router
git remote add upstream https://github.com/cloudnativelabs/kube-router
git checkout master
git fetch upstream
git rebase upstream/master

Create a Feature Branch

git checkout -b feature_x

Make your changes, then ensure they pass formatting, linting, and tests before committing:

make clean
make gofmt-fix
make

This project uses Conventional Commits. Please adopt this convention for all commit messages. Use the following scope abbreviations for controller changes:

  • NSC -- Network Services Controller (pkg/controllers/proxy/)
  • NRC -- Network Routes Controller (pkg/controllers/routing/)
  • NPC -- Network Policy Controller (pkg/controllers/netpol/)
  • LBC -- LoadBalancer Controller (pkg/controllers/lballoc/)

Commit with a descriptive message that explains the why, not just the what:

git add .
git commit -m "fix(NSC): handle nil endpoint slices during sync"

Stay Up-to-Date

Before pushing, rebase on the latest upstream:

git checkout master
git fetch upstream
git rebase upstream/master
git checkout feature_x
git rebase master

Submit a Pull Request

Push your branch and open a pull request:

git push origin feature_x

Then open a pull request from your fork on GitHub against the master branch.