gateway-routes

by KvalitetsIT

Helm chartv0.0.10App 0.0.10Verified publisher

Helm chart for exposing services through Istio ambient mesh using Gateway API resources. Renders ListenerSet, HTTPRoute, and AuthorizationPolicy resources from values. The chart renders nothing by default; resources are created only when explicitly configured.

About this chart

gateway-routes

Helm chart for exposing services through Istio ambient mesh using Gateway API resources. Renders ListenerSet, HTTPRoute, and AuthorizationPolicy resources from values. The chart renders nothing by default; resources are created only when explicitly configured.

Homepage: https://github.com/KvalitetsIT

Maintainers

NameEmailUrl
KvalitetsIT[email protected]https://github.com/KvalitetsIT/helm-repo

Source Code

Values

Defaults

KeyTypeDefaultDescription
defaults.gatewayobject{"name":"ingressgateway","namespace":"istio-ingress"}Default gateway to attach ListenerSets to.
defaults.gateway.namestring"ingressgateway"Gateway name.
defaults.gateway.namespacestring"istio-ingress"Gateway namespace.
defaults.clusterIssuerstring"letsencrypt-prod-istio"Default cert-manager cluster issuer for TLS certificates.

ReferenceGrant

KeyTypeDefaultDescription
referenceGrantobject{"enabled":false,"gatewayNamespace":"istio-ingress"}Optional. Creates a ReferenceGrant allowing the gateway namespace to reference ConfigMaps in this release namespace. Required for client certificate authentication via a dedicated Gateway with spec.tls.frontend.validation.caCertificateRefs pointing to a CA ConfigMap in the tenant namespace. The Gateway itself must be created by an admin in the gateway namespace (istio-ingress). See Client certificate authentication.
referenceGrant.enabledboolfalseOptional. Enable the ReferenceGrant.
referenceGrant.gatewayNamespacestring"istio-ingress"Optional. Override the source gateway namespace.

Routes

KeyTypeDefaultDescription
routesobject{}Map of routes to render. Each top-level key becomes the name of the ListenerSet and HTTPRoute. See Examples for usage.
routes.<name>.metadata.namestring""Optional. Override the rendered resource name.
routes.<name>.metadata.namespacestring""Optional. Override the rendered resource namespace.
routes.<name>.metadata.labelsobject{}Optional. Additional labels merged with common labels on all resources for this route.
routes.<name>.metadata.annotationsobject{}Optional. Annotations added to all resources for this route. The cert-manager.io/cluster-issuer annotation is managed via clusterIssuer.
routes.<name>.gateway.namestring""Optional. Gateway name. Defaults to defaults.gateway.name.
routes.<name>.gateway.namespacestring""Optional. Gateway namespace. Defaults to defaults.gateway.namespace.
routes.<name>.gateway.sectionNamestring""Optional. Gateway listener section name. When set, the ListenerSet is skipped and the HTTPRoute attaches directly to the named Gateway listener section. Use this when a listener is managed on the Gateway itself rather than via a per-tenant ListenerSet.
routes.<name>.listenerSet.namestring""Optional. Name of an existing ListenerSet in the route namespace to attach to. When set, no ListenerSet is rendered for this route and the HTTPRoute/TLSRoute attaches to the named ListenerSet instead. Use this when several applications share one hostname with different paths: one route owns the hostname (and its ListenerSet), the others attach to it. See Shared ListenerSet.
routes.<name>.clusterIssuerstring""Optional. Override the default cert-manager cluster issuer for this route. Defaults to defaults.clusterIssuer.
routes.<name>.serviceobject{}Optional. Creates a waypoint wrapper Service named <route-name>-mesh with istio.io/use-waypoint and istio.io/ingress-use-waypoint labels, routing ingressgateway traffic through the waypoint without affecting east-west traffic. When set, httpRoute.rules defaults to a single catch-all rule pointing to <route-name>-mesh — no explicit backendRefs needed.
routes.<name>.service.selectorobject{}Required. Pod selector labels for the wrapper Service. Must match the pod labels of the existing app deployment.
routes.<name>.service.portslist[]Required. Ports exposed on the wrapper Service.
routes.<name>.service.ports[0].namestring"http" for the first port, "http-N" for additional portsOptional. Port name.
routes.<name>.service.ports[0].portint80Optional. Service port.
routes.<name>.service.ports[0].targetPortintnilRequired. Pod target port.
routes.<name>.service.ports[0].protocolstring"TCP"Optional. Protocol.
routes.<name>.service.waypointstring"waypoint"Optional. Waypoint Gateway name to bind to.
routes.<name>.listenerslist[]Optional. Listener overrides for the ListenerSet. Hostnames always come from httpRoute.hostnames — one listener is rendered per hostname. When listeners has fewer entries than hostnames, the first entry is used as a template for remaining hostnames. When omitted entirely, HTTPS with all defaults is used. Use explicit listeners only when you need non-default protocol, port, or TLS settings.
routes.<name>.listeners[0].namestring"https" / "http" based on protocol; "https-N" / "http-N" for additional listenersOptional. Listener name. Must be unique within the ListenerSet.
routes.<name>.listeners[0].protocolstring"HTTPS"Optional. Protocol. HTTPS or HTTP.
routes.<name>.listeners[0].portint443 for HTTPS/TLS, 80 for HTTPOptional. Port.
routes.<name>.listeners[0].tlsobject{}Optional. TLS configuration. Defaults to Terminate mode with a Secret named after the hostname, managed by cert-manager via the clusterIssuer default.
routes.<name>.listeners[0].tls.modestring"Terminate"Optional. TLS mode.
routes.<name>.listeners[0].tls.certificateRefobjectSecret named after the listener hostname in the route namespaceOptional. Override the certificate reference. When set, the cert-manager.io/cluster-issuer annotation is omitted. Use this to reference a certificate Secret managed outside the chart. Requires a ReferenceGrant in the target namespace if the secret is in a different namespace than the ListenerSet.
routes.<name>.listeners[0].tls.certificateRef.namestring""Required when certificateRef is set. Secret name.
routes.<name>.listeners[0].tls.certificateRef.namespacestring""Required when certificateRef is set. Secret namespace.
routes.<name>.httpRouteobject{}Required. HTTPRoute configuration.
routes.<name>.httpRoute.hostnameslist[]Optional. Hostnames for the HTTPRoute and auto-generated ListenerSet listeners. When listeners is omitted, one HTTPS listener is auto-generated per hostname here. When listeners is set, this field is unused for the ListenerSet — hostnames are collected from the listener entries instead. Required when gateway.sectionName is set (no ListenerSet rendered). When listenerSet.name is set, hostnames are optional and default to the hostnames of the attached ListenerSet's listeners. When no hostnames are set, no ListenerSet is rendered.
routes.<name>.httpRoute.ruleslist[]Optional. Routing rules. When omitted and service is defined, defaults to a single catch-all rule pointing to <route-name>-mesh. Required otherwise.
routes.<name>.httpRoute.rules[0].matcheslist[]Optional. Match conditions (path, headers, method). If omitted, the rule matches all requests.
routes.<name>.httpRoute.rules[0].filterslist[]Optional. Filters to apply (URLRewrite, RequestRedirect, RequestHeaderModifier).
routes.<name>.httpRoute.rules[0].backendRefslist[]Optional. Backend services to forward matched requests to. Required when the rule has no filters and service is not defined. When omitted and service is defined, defaults to <route-name>-mesh.
routes.<name>.httpRoute.rules[0].backendRefs[0].namestring""Required. Service name.
routes.<name>.httpRoute.rules[0].backendRefs[0].portint80Optional. Service port.
routes.<name>.httpRoute.rules[0].backendRefs[0].weightint100Optional. Traffic weight (0-100). Used for traffic splitting.
routes.<name>.authorizationPoliciesobject{}Optional. Map of AuthorizationPolicy resources for this route. Each key becomes part of the policy name: -.
routes.<name>.authorizationPolicies.<policy-name>.metadata.namestring""Optional. Override the rendered AuthorizationPolicy name.
routes.<name>.authorizationPolicies.<policy-name>.metadata.labelsobject{}Optional. Additional labels for this AuthorizationPolicy.
routes.<name>.authorizationPolicies.<policy-name>.metadata.annotationsobject{}Optional. Annotations for this AuthorizationPolicy.
routes.<name>.authorizationPolicies.<policy-name>.targetRefslist[]Optional. Target refs for the policy. Defaults to every distinct backendRef the route serves, so a policy covers all of them. Set this explicitly to scope a policy to some of them. kind defaults to "Service", group defaults to "".
routes.<name>.authorizationPolicies.<policy-name>.actionstring"ALLOW"Optional. Policy action. Use ALLOW with remoteIpBlocks for an IP allowlist. Use DENY with notRemoteIpBlocks for a denylist. Use DENY with to.operation.paths to block specific paths.
routes.<name>.authorizationPolicies.<policy-name>.ruleslist[]Required. Authorization rules.

Hostname resolution

Hostnames are always defined in httpRoute.hostnames — they flow to both the ListenerSet and HTTPRoute. The listeners field controls only protocol, port, and TLS settings — never hostnames.

ConfigurationListenerSet listenersHTTPRoute hostnames
No listenersOne HTTPS listener auto-generated per hostnameFrom httpRoute.hostnames
listeners with one entryThat entry used as a template for all hostnamesFrom httpRoute.hostnames
listeners with N entriesEntries matched 1:1 to hostnames; first entry used as template for any extrasFrom httpRoute.hostnames
gateway.sectionName setNo ListenerSet renderedFrom httpRoute.hostnames
listenerSet.name setNo ListenerSet rendered; attaches to the named ListenerSetFrom httpRoute.hostnames, or inherited from the ListenerSet when omitted
No hostnamesNo ListenerSet rendered—

Waypoints

A waypoint is an optional per-namespace Envoy proxy that enforces L7 policy (path-based authorization, header policy, telemetry) on traffic into a Service. Without a waypoint, ztunnel only handles L4 mTLS — AuthorizationPolicy rules that reference HTTP methods, paths, or headers won't be enforced.

The waypoint is deployed separately (typically by a tenant bootstrap chart) as a Gateway with gatewayClassName: istio-waypoint. This chart does not deploy waypoints; it only opts Services into the waypoint path.

Opting a Service into the waypoint

A Service is routed through the waypoint when it carries these labels:

LabelValueEffect
istio.io/use-waypointwaypoint name (e.g. waypoint)Routes traffic to the named waypoint.
istio.io/ingress-use-waypoint"true"Opts ingressgateway traffic into the waypoint. Without this label, only east-west (pod-to-pod) traffic uses the waypoint; ingressgateway traffic bypasses it.

The <route-name>-mesh wrapper Service

Rather than labelling the application's existing Service, this chart renders a dedicated wrapper Service named <route-name>-mesh when routes.<name>.service is set. The wrapper carries the waypoint labels above and points at the application pods via service.selector. The HTTPRoute then targets the wrapper instead of the original Service.

This keeps the waypoint labels off the application Service, so east-west pod-to-pod traffic continues to flow through ztunnel (L4 only) without taking the extra waypoint hop. Only traffic arriving via the ingressgateway and routed through the wrapper passes through the waypoint.

When routes.<name>.service is set and httpRoute.rules is omitted, the chart defaults rules to a single catch-all rule pointing at <route-name>-mesh — no explicit backendRefs needed. See the Waypoint service and Block paths examples.

The waypoint name defaults to waypoint and can be overridden via service.waypoint.

nginx-ingress annotation migration

nginx annotationEquivalent
(none)Simple HTTPS route
nginx.ingress.kubernetes.io/backend-protocol: HTTPNo action needed — Envoy always uses HTTP to the backend
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"No action needed — the ListenerSet only exposes port 443
nginx.ingress.kubernetes.io/rewrite-target + nginx.ingress.kubernetes.io/use-regexPath rewrite
nginx.ingress.kubernetes.io/app-rootApp-root redirect
nginx.ingress.kubernetes.io/whitelist-source-rangeIP allowlist — ALLOW + remoteIpBlocks
nginx.ingress.kubernetes.io/enable-cors / nginx.ingress.kubernetes.io/cors-allow-*CORS
nginx.ingress.kubernetes.io/ssl-passthroughSSL passthrough
nginx.ingress.kubernetes.io/auth-tls-verify-client / nginx.ingress.kubernetes.io/auth-tls-secretClient certificate authentication
`nginx.ingress.kuberne

Deploy gateway-routes with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gateway-routes on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgateway-routes is pinned at v0.0.10 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply