Skip to content

Repository files navigation

Nantian Gateway

A Kubernetes Gateway API control plane for split-plane ingress, API routing, and AI gateway workloads.

License Go Gateway API E2E CI Docs

Performance

Nightly conformance + load test results (600s vegeta, via Gateway → dataplane):

Metric Value
Throughput 7,800–9,400 RPS
P50 latency 3–4 ms
P99 latency 13–15 ms
CPU (dataplane) ~1,100m
Success rate 100%

See platform-release for full nightly history.

Why Nantian Gateway?

Nantian Gateway Envoy Gateway Istio Traefik
Control plane Go Go Go Go
Data plane Rust (Pingora) Envoy (C++) Envoy (C++) Traefik (Go)
AI Gateway Yes (native)
Wasm plugins Yes (wasmtime) Yes (proxy-wasm) Yes (proxy-wasm) Yes (yaegi)
Gateway API v1.5.1 v1.2+ v1.2+ v1.2+
L4 (TCP/UDP) Yes Yes Yes Yes
Dashboard Yes (Next.js) Kiali Yes
License Apache 2.0 Apache 2.0 Apache 2.0 MIT

Chinese README

What Is Nantian Gateway?

Nantian Gateway is a Kubernetes Gateway API implementation with a Go control plane and a Rust data plane. This repository contains the control plane: it watches Gateway API resources, translates them into internal routing state, serves operational and admin APIs, and publishes runtime snapshots to data planes over gRPC/xDS.

Use Nantian Gateway when you want standard Kubernetes Gateway API resources for ingress traffic, API routing, and AI gateway workloads without inventing a custom routing CRD or proprietary configuration language.

Architecture

Kubernetes API
  Gateway, HTTPRoute, GRPCRoute, TLSRoute, policies, Services, Secrets
        |
        v
Go control plane (this repository)
  watch -> translate -> validate/status -> publish snapshots
        |
        | gRPC/xDS
        v
Rust data plane
  HTTP, gRPC, TCP, UDP, TLS, AI gateway, and Wasm runtime traffic handling
        |
        v
Backends and AI providers

The control plane is designed to stay Kubernetes-native. Gateway API resources remain the source of truth. The Rust data plane consumes the translated runtime model and handles live traffic. Optional sibling projects provide the Helm chart, Dashboard, Website, and shared Proto contract.

Install

Helm

Helm is the recommended production installation path:

helm repo add nantian-gw https://chart.nantian.dev
helm install nantian-gw nantian-gw/nantian-gw \
  --namespace nantian-gw \
  --create-namespace

See the Helm chart repository for values, schema validation, and chart release details.

Kustomize

Repository-local Kubernetes overlays are available under deploy/kubernetes/:

kustomize build deploy/kubernetes/overlays/production \
  --load-restrictor LoadRestrictionsNone \
  | kubectl apply -f -

Requirements

  • Kubernetes 1.28 or newer.
  • Gateway API CRDs installed on the cluster.
  • A compatible Nantian data plane deployment.

Verify Locally

For a local smoke test with Kind, run:

make e2e-smoke

The smoke test creates a local cluster, installs required resources, deploys the gateway stack, and verifies a basic route path.

For comprehensive e2e scenario testing (multi-route, header/query matching, URL rewrite, traffic splitting, TLS, error handling), run:

make e2e

For Gateway API conformance testing, run:

make conformance

All commands require local Kubernetes tooling such as Kind, kubectl, and kustomize.

Gateway API Support

Nantian Gateway targets Gateway API v1.5.1. Use the conformance package and supported-feature declarations as the local source of truth for exact support status:

The public documentation site also summarizes supported scenarios at nantian.dev.

AI Gateway And Extensions

Nantian Gateway can route AI traffic and extension behavior through Kubernetes-managed configuration:

  • AI provider routing and model selection.
  • Token policy and quota-oriented extension resources.
  • WasmPlugin resources for sandboxed request and response extension hooks.
  • Backend TLS and load-balancing policies for upstream behavior.

Related control-plane source areas:

  • internal/gatewayapiexperimental/
  • internal/translator/ai_service.go
  • internal/translator/token_policy.go
  • internal/translator/wasm_plugin.go

Operations And Observability

The gateway control plane exposes operational surfaces for production use:

  • Admin APIs for health, topology, runtime state, and diagnostics.
  • Prometheus metrics for controller, admin, and gRPC publication paths.
  • Controlplane tracing can be enabled with deploy/kubernetes/overlays/observability-enabled/ when you want OTLP trace export from the controlplane without changing the default production overlay.
  • Deployment overlays under deploy/kubernetes/.
  • Observability assets under deploy/observability/.
  • Generated admin API contracts under docs/contracts/.

Development

Common commands:

make build
make test
go test ./internal/translator
make e2e-smoke
make e2e
make conformance

Protobuf source and generation workflow live in the sibling Proto repository. Generated protobuf code under gen/ should not be edited by hand.

For agent-specific repository guidance, see AGENTS.md. For community expectations, see CODE_OF_CONDUCT.md.

Related Repositories

Repository Purpose
nantian-gw/dataplane Rust data plane for traffic handling and xDS consumption.
nantian-gw/helm-charts Helm chart for Kubernetes installation.
nantian-gw/dashboard Next.js admin console.
nantian-gw/website Documentation site at nantian.dev.
nantian-gw/proto Shared protobuf contract.

Project Status

Nantian Gateway is under active development. It has a working control plane, data plane integration, admin APIs, Kind smoke tests, conformance workflows, and production deployment overlays. It is not yet an officially recognized Gateway API implementation.

Community

License

Apache 2.0. See LICENSE.

About

Nantian Gateway — Kubernetes Gateway API implementation with AI proxy, WASM plugin system, split control plane (Go) and data plane (Rust)

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages