We appreciate contributions from the community to make Piper even better. To contribute, follow the steps below:
- Fork the Piper repository to your GitHub account.
- Clone the forked repository to your local machine:
git clone https://github.com/your-username/Piper.git
- Create a new branch to work on your feature or bug fix:
git checkout -b my-feature
- Make your changes, following the coding guidelines outlined in this document.
- Commit your changes with clear and descriptive commit messages and sign it:
git commit -s -m "fix: Add new feature"
- please make sure you commit as described in conventional commit
- Push your changes to your forked repository:
git push origin my-feature
- Open a pull request against the main branch of the original Piper repository.
We welcome and appreciate contributions from the community. If you have developed a new feature, improvement, or bug fix for Piper, follow these steps to submit a pull request:
- Make sure you have forked the Piper repository and created a new branch for your changes. Checkout How To Contribute.
- commit your changes and push them to your forked repository.
- Go to the Piper repository on GitHub.
- Click on the "New Pull Request" button.
- Select your branch and provide a descriptive title and detailed description of your changes.
- If your pull request relates to an open issue, reference the issue in the description using the GitHub issue syntax (e.g., Fixes #123).
- Submit the pull request, and our team will review your changes. We appreciate your patience during the review process and may provide feedback or request further modifications.
The name should follow conventional commit naming.
To maintain a consistent codebase and ensure readability, we follow a set of coding guidelines in Piper. Please adhere to the following guidelines when making changes:
- Follow the Effective Go guide for Go code.
- Follow the Folder convention guide for Go code.
- Write clear and concise comments to explain the code's functionality.
- Use meaningful variable and function names.
- Make sure your code is properly formatted and free of syntax errors.
- Run tests locally.
- Check that the feature documented.
- Add new packages only if necessary and already existing one, can't be used.
- Add tests for new features or modification.
To make sure that the documentation is updated use helm-docs comment convention. The pipeline will execute helm-docs
command and update the version of the chart.
Also, please make sure to run those commands locally to debug the chart before merging:
make helm
To make it easy to develop locally, please run the following
Prerequisites :
- install helm
brew install helm
- install kubectl
brew install kubectl
-
isntall docker
-
install ngrok
brew install ngrok
- install 5
brew install kind
Deployment:
- make sure docker are running.
- create tunnel with ngrok using
make ngrok
, save theForwarding
address. - create
values.dev.yaml
file that contains subset of chart'svalue.yaml
file. check example of values file rename it tovalues.dev.yaml
and put in root directory. - use
make deploy
. it will do the following:- deploy a local registry as container
- deploy a kind cluster as container with configuration
- deploy nginx reverse proxy in the kind cluster
- deploy Piper with the local helm chart
- validate using
curl localhost/piper/healthz
.
For debugging the best practice is to use Rookout. To enable this function pass a Rookout token in the chart rookout.token
or as existing secret rookout.existingSecret