Thank you for your interest in contributing to the silence-operator! This guide will help you get started.
- Go 1.21+
- Kubernetes 1.25+
- Docker
- kubectl
- Helm 3+
- Fork this repository and clone your fork
- Install development tools:
make install-tools
- Generate code and manifests:
make generate-all-with-helm
- Create a feature branch from
main - Make your changes following the coding standards
- Write tests for new functionality (both unit and integration tests)
- Update documentation as needed
- Test your changes:
make test-ginkgo make lint
- Bump the chart version for every change (see
helm/silence-operator/Chart.yaml) - Update CHANGELOG.md with your changes
The project supports two API versions:
- v1alpha1: Legacy cluster-scoped API (deprecated but maintained)
- v1alpha2: New namespace-scoped API (recommended for new features)
When adding features:
- Implement in v1alpha2 first
- Consider backward compatibility with v1alpha1 if applicable
- Update migration documentation if the change affects migration
- Write tests for both API versions where applicable
- Include tests for error scenarios
- Ensure coverage remains above 40%
- Test migration scenarios if your changes affect both APIs
- Follow standard Go conventions
- Use meaningful variable and function names
- Add appropriate comments for public APIs
- Keep functions focused and testable
- Ensure all tests pass and linting is clean
- Update documentation for any user-facing changes
- Include a clear description of what your PR does
- Reference any related issues
- Be prepared to address review feedback
Releases are handled by the maintainers. After your PR is merged:
- The CHANGELOG.md will be updated
- A new version will be tagged
- Container images will be built and pushed
- Helm charts will be published
For more details, see our Security Policy for security-related contributions.