This guide explains how to contribute to the Squid Operator project.
- Go 1.16 or later
- Docker
- kubectl
- kind or minikube
- operator-sdk
- Clone the repository:
git clone https://git.fr.clara.net/claranet/healthcare/buildops/projects/kubernetes/operators/squid-operator
cd squid-operator- Install dependencies:
go mod download- Set up a local Kubernetes cluster:
kind create cluster --name squid-operator- Install the operator:
make install
make deployThe project follows a standard Go project layout:
.
├── api/ # API definitions
├── controllers/ # Controller implementations
├── internal/ # Internal packages
├── pkg/ # Public packages
├── config/ # Configuration files
└── deploy/ # Deployment manifests
- Create a new branch:
git checkout -b feature/your-feature-
Make your changes
-
Run tests:
make test- Build the operator:
make build- Deploy to your local cluster:
make deploymake testmake test-integrationmake test-e2eThe project follows the following coding standards:
-
Go Code
- Use
gofmtfor formatting - Follow Go best practices
- Write unit tests for new code
- Use
-
Documentation
- Document all public APIs
- Update README for significant changes
- Add comments for complex logic
-
Git Commits
- Use conventional commits
- Write clear commit messages
- Reference issues in commits
- Fork the repository
- Create your feature branch
- Make your changes
- Run tests
- Submit a pull request
- Tests added/updated
- Documentation updated
- Code follows style guidelines
- All tests pass
- Branch is up to date
- Documentation is written in Markdown
- Located in the
docs/directory - Follow the existing structure
- Use proper formatting
- Create a new file in the appropriate directory
- Add the file to
mkdocs.yml - Follow the existing style
- Include examples where appropriate
The project follows semantic versioning:
- MAJOR version for incompatible API changes
- MINOR version for backward-compatible functionality
- PATCH version for backward-compatible bug fixes
- Update version numbers
- Update changelog
- Create release tag
- Build and publish artifacts
- Be respectful
- Be constructive
- Be collaborative
- Be professional
- Use the issue tracker for bugs and features
- Use pull requests for code changes
- Use discussions for questions and ideas
If you need help:
- Check the documentation
- Search existing issues
- Open a new issue
- Contact the maintainers
- Testing - Testing guidelines
- Release Process - Release management
- Security - Security guidelines