Vale Gateway is a Rust-based implementation of the Kubernetes Gateway API, leveraging the Pingora proxy for efficient and scalable traffic management. This project aims to provide a robust and flexible solution for managing ingress traffic in Kubernetes clusters.
This project is in its infancy, and I'm continuing to experiment with the design and implementation. I don't have a goal at this time to make it production worthy without additional help.
api/: Contains custom resource definitions (CRDs) for the Gateway API.build/: Contains build scripts and code generation tools.control_plane/: Contains the controller logic for managing Gateway API resources via the Kubernetes API.core/: Contains the core configuration and reusable components.gateway/: Contains the proxy implementation using Pingora.helm/: Contains a Helm chart for deploying the Vale Gateway controller.
To run Vale Gateway locally, you need to have the following prerequisites installed:
- Rust
- Docker
- Minikube or a Kubernetes cluster
- Build using Cargo:
cargo build
- Start Minikube:
minikube start
- Configure Docker to use Minikube's Docker daemon:
eval $(minikube docker-env)
- Build the Docker image:
docker build -t vale-gateway-controller:latest . - Deploy the controller to Minikube:
helm upgrade --install vale-gateway helm/
- Add
Service,Deployment,GatewayandHTTPRouteresources to your cluster (not provided in this repo yet):kubectl apply -f api/gateway.yaml kubectl apply -f api/http_route.yaml
The following CRDs are defined in the api/ directory:
GatewayClassParameters: Defines parameters for aGatewayClass, applies things to allGatewaysGatewayParameters: Defines parameters for aGateway, applies to a specificGateway
Vale Gateway supports the following Gateway API features:
- Gateway: Defines ingress points and listeners for traffic
- HTTPRoute: Configures HTTP routing rules and traffic management
- GatewayClass: Defines gateway controller configuration
- RequestHeaderModifier: Modify request headers (set, add, remove)
- ResponseHeaderModifier: Modify response headers (set, add, remove)
- RequestRedirect: Redirect HTTP requests to different URLs with configurable:
- Scheme (HTTP/HTTPS)
- Hostname
- Port
- Path rewriting (full path replacement or prefix matching)
- Status codes (301, 302)