Skip to content

🀝 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

  1. Fork the repository and create a feature branch from main
  2. Follow the commit conventions below
  3. Write tests for new functionality
  4. Ensure all CI checks pass (make lint test)
  5. Update documentation if your change affects user-facing behavior
  6. Submit a PR against main

Commit Conventions

We follow Conventional Commits:

<type>(<scope>): <description>

[optional body]

[optional footer(s)]
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

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! πŸŽ‰