In this file you'll find all the references needed for you to start contributing code to the HTTP Add-on project.
To get started, first fork this repository to your account. You'll need to have the following tools installed:
- Go for development
- golangci-lint for Go linting
- ko for building container images and deploying
- kustomize for generating Kubernetes manifests
- Make for build automation
- pre-commit for static checks (optional)
Install pre-commit and golangci-lint, then register the git hooks:
pre-commit install --hook-type pre-commit --hook-type pre-pushThis enables automatic static checks (formatting, linting, changelog validation, etc.) on git commit and git push as configured in .pre-commit-config.yaml.
To run all checks manually: make pre-commit.
You'll need a running Kubernetes cluster. You can use a cloud provider (AKS, GKE, EKS) or a local cluster like KinD, k3s, or Minikube.
Install KEDA and the HTTP Add-on following the install instructions.
make build: Build all binaries locallymake test: Run unit testsmake lint: Run lintermake lint-fix: Run linter with auto-fixmake e2e-test: Run all e2e tests against an existing clustermake generate: Generate code (DeepCopy) and Kubernetes manifests (run after modifying CRD types or webhook configs)make deploy: Build and deploy all components to the clustermake deploy-interceptor: Build and deploy the interceptormake deploy-operator: Build and deploy the operatormake deploy-scaler: Build and deploy the scalermake pre-commit: Run all static checks
This project uses ko for building container images and deploying to Kubernetes. ko builds Go binaries and packages them into container images without requiring Docker, with automatic dependency caching for fast incremental builds.
Set the KO_DOCKER_REPO environment variable for your target:
- Local registry:
export KO_DOCKER_REPO=localhost:<port> - KinD:
export KO_DOCKER_REPO=kind.local(only works with Docker, not Podman)
After making code changes, deploy a single component:
make deploy-interceptorOr deploy all components at once:
make deployko will:
- Build the Go binary with dependency caching
- Create a container image with layer caching
- Push to the configured registry
- Apply manifests with resolved image references
E2E tests live in test/e2e/ and are organized by profile. Each profile groups tests that require a specific HTTP Add-on configuration.
For example, the default profile covers standard routing and scaling behavior with the default configuration, while the tls profile tests TLS termination and requires the interceptor to be deployed with TLS certificates enabled.
# Create a KinD cluster
kind create cluster
# Install all e2e dependencies and deploy the HTTP Add-on
make e2e-setup
# Or install individual dependencies (see Makefile for all targets)
make e2e-deps-otel-collector
make e2e-deps-jaeger# Run all e2e tests (all profiles)
make e2e-test
# Run a specific profile
make e2e-test PROFILE=tls
# Run a specific test by name
make e2e-test PROFILE=default RUN=TestColdStart
# Run tests matching specific labels
make e2e-test E2E_ARGS="--labels=area=scaling"
# List tests without executing them
make e2e-test E2E_ARGS="--dry-run"The PROFILE variable selects a test profile directory under test/e2e/ (e.g. PROFILE=tls runs ./test/e2e/tls/...). Each subdirectory in test/e2e/ is a profile.
The RUN variable filters tests by name using Go's -run flag (supports regex, e.g. RUN=TestColdStart or RUN="TestHost|TestPath").
The E2E_ARGS variable passes flags to the e2e-framework via -args (e.g. --labels, --feature, --skip-labels, --dry-run).