Development¶
This section covers development setup, architecture, and contribution guidelines.
Sections¶
-
Setup
Set up your local development environment with all required tools.
-
Architecture
Deep dive into the controller architecture, components, and data flow.
-
Contributing
Guidelines for contributing code, documentation, and reporting issues.
-
Testing
Testing patterns, running tests, and writing new test cases.
Quick Start¶
# Clone repository
git clone https://github.com/lexfrei/pingora-gateway-controller.git
cd pingora-gateway-controller
# Install dependencies
go mod download
# Run tests
go test -race ./...
# Build binary
go build -o bin/controller ./cmd/controller
# Run linter
golangci-lint run
Project Structure¶
├── api/
│ ├── proto/routing/v1/ # Protobuf schema for gRPC API
│ └── v1alpha1/ # PingoraConfig CRD types
├── cmd/controller/ # Entrypoint and CLI
├── internal/
│ ├── config/ # PingoraConfig resolver
│ ├── controller/ # Kubernetes controllers
│ ├── dns/ # Cluster domain detection
│ ├── ingress/ # Route → Pingora conversion
│ └── metrics/ # Prometheus metrics
├── pkg/api/routing/v1/ # Generated gRPC client
├── proxy/ # Git submodule: Pingora proxy
├── charts/ # Helm chart
├── deploy/ # Raw Kubernetes manifests
└── docs/ # Documentation
Next Steps¶
- Set up Development Environment
- Understand the Architecture
- Read Contributing Guidelines