We welcome contributions! This document provides guidelines for contributing to KubeOpenCode.
Before contributing, please:
- Review the Architecture Documentation
- Set up your Local Development Environment
- Read through AGENTS.md for detailed development guidelines
Always use signed commits with the -s flag (Developer Certificate of Origin):
git commit -s -m "feat: add new feature"Follow the Conventional Commits format:
<type>: <description>
[optional body]
Signed-off-by: Your Name <your.email@example.com>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
- Check for upstream repositories first
- Create PRs against upstream, not forks
- Ensure your branch is up to date with main
- Run all checks locally:
make lint # Run linter
make test # Run unit tests
make verify # Verify generated code is up to date- Use descriptive titles and comprehensive descriptions
- Reference related issues (e.g., "Fixes #123")
- Keep PRs focused - one feature or fix per PR
- Update documentation if your changes affect user-facing behavior
- Add tests for new functionality
## Summary
Brief description of the changes
## Related Issues
Fixes #<issue-number>
## Test Plan
- [ ] Unit tests pass
- [ ] Integration tests pass (if applicable)
- [ ] E2E tests pass (if applicable)
- [ ] Manual testing performed- Follow standard Go conventions
- Use
gofmtandgolint - Write comments in English
- Document exported types and functions
- Use meaningful variable and function names
- Write tests for new features
- Maintain test coverage
- Use table-driven tests where appropriate
# Run unit tests
make test
# Run integration tests (uses envtest)
make integration-test
# Run E2E tests (uses Kind cluster)
make e2e-teardown && make e2e-setup && make e2e-testWhen modifying CRD definitions:
- Update
api/v1alpha1/types.go - Run
make updateto regenerate CRDs and deepcopy - Run
make verifyto ensure everything is correct - Update documentation in
website/docs/architecture.md - Update integration tests in
internal/controller/*_test.go - Update E2E tests in
e2e/
make build # Build the controller
make docker-build # Build Docker imagemake run # Run controller locally (requires kubeconfig)See Local Development Guide for detailed instructions on:
- Setting up a Kind cluster
- Building and loading images
- Running E2E tests
When reporting issues:
- Search existing issues to avoid duplicates
- Use a clear, descriptive title
- Include:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (Kubernetes version, OS, etc.)
- Relevant logs or error messages
- Review existing documentation in
docs/ - Check Troubleshooting Guide
- Open a GitHub Discussion
- Review existing issues and PRs
By contributing to KubeOpenCode, you agree that your contributions will be licensed under the Apache License 2.0.