π€ Contributing to Zelyo Operator¶
Thank you for your interest in contributing to Zelyo Operator! Whether you're fixing a bug, adding a feature, or improving documentation β every contribution makes Zelyo better for the community.
Code of Conduct¶
By participating in this project, you agree to abide by our Code of Conduct.
πΊοΈ How to Contribute¶
Reporting Issues¶
- Use GitHub Issues for bug reports and feature requests
- Security vulnerabilities: Please see our Security Policy β do not use public issues
- Include reproduction steps, expected behavior, and actual behavior
- Include your Kubernetes version, Zelyo Operator version, and cloud provider
Pull Requests¶
- Fork the repository and create a feature branch from
main - Follow the commit conventions below
- Write tests for new functionality
- Ensure all CI checks pass (
make lint test) - Update documentation if your change affects user-facing behavior
- Submit a PR against
main
Commit Conventions¶
We follow Conventional Commits:
| Types | Scopes |
|---|---|
feat, fix, docs, style, refactor | scanner, monitor, llm, remediation |
perf, test, build, ci, chore | dashboard, notifier, helm, api, crd, ci |
Examples:
feat(scanner): add RBAC over-permission detection
fix(llm): respect hourly token budget limits
docs(api): add OpenAPI spec for incidents endpoint
π οΈ Development Setup¶
Prerequisites¶
- Go 1.25+
- Docker
- kubectl
- kind or minikube
- Kubebuilder 4.x
- Helm 3.x
Getting Started¶
# Clone your fork
git clone https://github.com/<your-username>/zelyo-operator.git
cd zelyo-operator
# Add upstream remote
git remote add upstream https://github.com/zelyo-ai/zelyo-operator.git
# Install dependencies
make install
# Generate manifests and code
make manifests generate
# Run tests
make test
# Run locally against a kind cluster
kind create cluster --name zelyo-operator-dev
make install # Install CRDs
make run # Run the operator
Project Structure¶
βββ api/v1alpha1/ # CRD type definitions
βββ cmd/ # Entrypoint
βββ config/ # Kubebuilder kustomize configs
βββ deploy/helm/ # Helm chart
βββ docs/ # Documentation
βββ internal/
β βββ controller/ # Kubebuilder controllers
β βββ webhook/ # Admission webhooks
β βββ llm/ # LLM client (BYO keys)
β βββ scanner/ # Security scanner
β βββ monitor/ # Real-time monitoring
β βββ anomaly/ # Anomaly detection
β βββ compliance/ # Compliance frameworks
β βββ costoptimizer/ # Cost optimization
β βββ drift/ # Config drift detection
β βββ remediation/ # GitOps fix generator
β βββ notifier/ # Alert routing
β βββ dashboard/ # Embedded web UI
β βββ api/ # REST API
β βββ ...
βββ hack/ # Development scripts
Make Targets¶
| Target | Description |
|---|---|
make build | Build the operator binary |
make test | Run all tests |
make lint | Run golangci-lint |
make manifests | Generate CRD manifests |
make generate | Generate deep copy methods |
make docker-build | Build Docker image |
make install | Install CRDs into cluster |
make run | Run operator locally |
π§ͺ Testing¶
- Unit tests: Place in the same package as the code being tested
- Integration tests: Use envtest (Kubebuilder's test framework)
- Coverage: Aim for >80% coverage on new code
# Run all tests with coverage
make test
# Run specific package tests
go test ./internal/scanner/... -v
β Questions?¶
Open a Discussion for questions about the project.
Thank you for contributing to Zelyo Operator! π