GitHub

a lit way through the cloud

A Gateway that becomes a Cloudflare Tunnel™.

Your standard Gateway and HTTPRoute become a managed Cloudflare Tunnel, its DNS records, and full L7 routing in an in-pod Envoy, with Cloudflare Access™ verified at the origin and no inbound ports or public IPs.

Try helm template — no cluster, no credentials

A tunnel is transport. Routing needs a proxy.

Cloudflare Tunnel makes a cluster reachable with no inbound ports or public IPs. But cloudflared alone matches only hostnames and simple paths.

cloudflared ingress rules
  • hostname
  • simple path

No method, query, or header matches. No weighted splits.

HTTPRoute through Flareway’s in-pod Envoy
match on HTTP method
HTTPRouteMethodMatching
match on query parameters
HTTPRouteQueryParamMatching
rewrite the path
HTTPRoutePathRewrite
rewrite the host
HTTPRouteHostRewrite
redirects, with 303/307/308
HTTPRoutePathRedirect
mirror requests, including by percentage
HTTPRouteRequestMirror
request and backend timeouts
HTTPRouteRequestTimeout
CORS headers and preflight
HTTPRouteCORS
WebSocket and h2c backends
HTTPRouteBackendProtocolWebSocket
TLS to backends, with SAN validation
BackendTLSPolicy

Header matches and weighted backends are Gateway API Core. Every feature listed passed the local Gateway API conformance run. Read what routes can do.

One Gateway, one tunnel, one data plane.

Traffic enters only through cloudflared, which dials out over QUIC/HTTP2. Envoy takes decrypted requests over loopback and applies the routes the controller streams to it over xDS.

How traffic reaches the clusterBrowsers and WARP devices reach the Cloudflare edge. Inbound paths into the cluster are blocked at a sealed boundary. The outbound tunnel, opened by cloudflared inside the data-plane pod, crosses the boundary. cloudflared hands requests to Envoy over loopback; the Flareway controller streams routes to Envoy over xDS. Envoy forwards to Services and Pods.Browserspublic hostnamesWARP devicesprivate network routesCloudflare® edgeedge TLS · proxied CNAMEprivate network route<tunnel-id>.cfargotunnel.comno inboundno inboundsealed cluster boundaryno inbound ports, no public IPsflarewaycontrollerxDS · Delta ADSdata-plane podcloudflaredEnvoyloopback+ CoreDNS sidecar for private listenersServicePodsrouted by your HTTPRoute rulesoutbound tunnelQUIC / HTTP2opened from inside
Traffic rides a tunnel the cluster opens outbound. Nothing listens inbound.1 Gateway : 1 tunnel : 1 data plane

Two standard objects in. Five results out.

The sample manifests from config/samples, unedited. No annotations: the tunnel hangs off the standard parametersRef. Hover or focus a result to see the lines behind it.

gateway_v1_gateway.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: public
  namespace: default
spec:
  gatewayClassName: flareway
  infrastructure:
    parametersRef:
      group: flareway.bhyoo.com
      kind: CloudflareTunnel
      name: public
  listeners:
  - name: web
    hostname: app.example.com
    port: 80
    protocol: HTTP
    allowedRoutes:
      namespaces:
        from: Same
gateway_v1_httproute.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: public
  namespace: default
spec:
  parentRefs:
  - name: public
    sectionName: web
  hostnames:
  - app.example.com
  rules:
  - matches:
    - path:
        type: PathPrefix
        value: /
    backendRefs:
    - name: example-service
      port: 8080

What the controller produces

Access policies attach to routes through GEP-713 policy attachment — next section. Walk through it in Expose a Service, or read the sample manifests.

Access enforced at the edge and at the origin.

Access policies and WARP® private networks are Kubernetes® resources. A policy attaches to the route it protects, not to an annotation.

Policy attachment (GEP-713)

Attach an AccessApplication to a Gateway listener or an HTTPRoute. Flareway configures the Access application and policy at the edge, then verifies the Access JWT again at the origin: by cloudflared and Envoy for public hostnames, by Envoy for private ones. Until the AUD tag and team domain are known, the route stays blocked.

AccessApplication types include
  • SelfHostedweb applications
  • SSHbrowser SSH
  • RDPbrowser RDP
  • MCPMCP servers
Protect a route with Access

Private services over WARP, same Gateway

Set a listener’s exposure to Private, and WARP devices reach the Service through the same Gateway, HTTPRoute, and AccessApplication. Envoy terminates TLS with a certificate Secret you supply; a CoreDNS sidecar answers private hostnames with 127.0.0.1 so the traffic passes through Envoy.

  • VirtualNetwork
  • NetworkRoute
  • HostnameRoute
  • WARPConnector

for WARP reachability and k8s-to-VPC site-to-site links

Private services over WARP

Direct mode for non-Gateway origins

A CloudflareTunnel in Direct mode owns the complete remote cloudflared configuration.

  • TCP
  • SSH
  • RDP
  • bastion
Direct tunnels

Fail closed, on purpose

On uncertainty, Flareway denies. Every operation needs a yes from two authorization layers.

  1. Kubernetes RBAC

    What the controller itself may read and write in the cluster.

  2. CloudflareAccount grants

    spec.grants scopes which namespaces, hostnames, zones, and exposures may use an account. A namespace that matches no grant is denied.

Adoption is explicit
Existing remote objects are taken over only through AdoptById — never by name alone.
Deletion never opens a route
Deleting an AccessApplication never makes a protected route public.
Credentials stay in Secrets
The controller never writes API tokens to status, Events, or request logs. Tunnel tokens and service-token secrets live only in Secrets.
Read the security model

Try it: read the install before it runs.

helm template renders what the chart would install, so you can read it before anything runs. Needs Helm 4.3 or a compatible Helm 3 client.

Pulls the published chart. No cluster, no Cloudflare credentials.
helm template flareway oci://ghcr.io/isac322/charts/flareway \
  --namespace flareway-system \
  --set gatewayClass.create=true \
  --set gatewayClass.config.accountRefName=example-account

It prints

  • the controller Deployment
  • RBAC
  • Services
  • NetworkPolicies
  • GatewayClass/flareway, because gatewayClass.create=true
  • its GatewayClassConfig/default, which names the example-account CloudflareAccount

Add --include-crds to also render the Flareway CRDs.

gatewayClass.create defaults to false, so an install cannot silently take ownership of an existing GatewayClass.

Flareway is open source.

Licensed under Apache-2.0. Stars help other platform engineers find it.