Skip to content

Development

This section covers development setup, architecture, and contribution guidelines.

Sections

  • Setup


    Set up your local development environment with all required tools.

    Setup

  • Architecture


    Deep dive into the controller architecture, components, and data flow.

    Architecture

  • Contributing


    Guidelines for contributing code, documentation, and reporting issues.

    Contributing

  • Testing


    Testing patterns, running tests, and writing new test cases.

    Testing

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