Reference / experimental
envoy-gateway
These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.
A Gateway served by Envoy Gateway, with its own Envoy proxies and Service
This page is generated from kix/packages/experimental/envoy-gateway.
| Stability | Experimental |
package value | packages.experimental.envoy-gateway |
| Default aliases | gateway |
How-to guides
Section titled “How-to guides”Dependencies
Section titled “Dependencies”Kix matches each dependency below to another package instance by instance name, alias, or role. To bind a specific instance, set deps.<name> in your cluster definition. See Declaring dependencies for how required and optional dependencies work.
| Dependency | Requirement |
|---|---|
clusterIssuer | Optional |
envoyGateway | Optional |
gatewayApi | Optional |
prometheus | Optional |
Options
Section titled “Options”addresses
Section titled “addresses”Addresses to request on the Gateway (spec.addresses), such as a static IP for the proxy LoadBalancer Service.
-
Type:
list of (submodule) -
Default:
[ ] -
Example:
1[2{3type = "IPAddress";4value = "192.0.2.10";5}6]
addresses.*.type
Section titled “addresses.*.type”IPAddress (the Gateway API default), Hostname, or an implementation-specific type.
- Type:
null or string - Default:
null
addresses.*.value
Section titled “addresses.*.value”Address value, such as an IP address for IPAddress or a DNS name for Hostname.
- Type:
string
clientSources
Section titled “clientSources”Traffic sources that the network policy allows to reach the proxies’
listener ports: "world" allows external IP addresses outside the
cluster, and "all-pods" allows all pods and cluster nodes. Omit
"world" (for example, [ "all-pods" ]) on an internal Gateway. Any
securityPolicy IP allowlist runs after the network policy.
Clients need "world" when they reach the Gateway through a router
that rewrites their source to an address other than a pod or node
IP, as some VPN subnet routers do.
-
Type:
list of (one of "world", "all-pods") -
Default:
1[2"world"3"all-pods"4] -
Example:
1[2"all-pods"3]
clientTrafficPolicy
Section titled “clientTrafficPolicy”Envoy Gateway ClientTrafficPolicy spec fields
(gateway.envoyproxy.io/v1alpha1) configuring how the proxies handle
client connections across all listeners. When non-empty, the package
creates a ClientTrafficPolicy attached to this Gateway. Kix rejects
targetRef, targetRefs, and targetSelectors.
Common settings: clientIPDetection.xForwardedFor.trustedCIDRs lists
upstream proxy or CDN IP ranges whose X-Forwarded-For header the
Gateway trusts; tls.minVersion sets the minimum TLS version (defaults
to "1.2"); tls.alpnProtocols = [ "http/1.1" ] disables HTTP/2; and
headers.lateResponseHeaders adds response headers across all routes on
the Gateway.
-
Type:
attribute set of anything -
Default:
{ } -
Example:
1{2clientIPDetection.xForwardedFor.trustedCIDRs = [ "192.0.2.0/24" ];3tls.minVersion = "1.3";4headers.lateResponseHeaders.set = [5{6name = "Strict-Transport-Security";7value = "max-age=31536000; includeSubDomains";8}9];10}
httpsRedirect
Section titled “httpsRedirect”Redirect all requests on the Gateway’s HTTP listeners to HTTPS with a
301 status code. The package attaches a redirect HTTPRoute to each
HTTP listener and sets allowedRoutes.namespaces.from = "Same" on
HTTP listeners so routes from other namespaces attach only to HTTPS
listeners. Requires at least one HTTP listener and one active HTTPS
listener.
- Type:
boolean - Default:
false
listenerIssuers
Section titled “listenerIssuers”Map of HTTPS listener name to ClusterIssuer name for automatic TLS
certificates. Each value must match a cluster-issuer instance wired
to clusterIssuer. When only one issuer is wired, HTTPS listeners
omitted here use it automatically.
When a clusterIssuer dependency is present, the package creates a
cert-manager Certificate for each HTTPS listener without
tls.certificateRefs (using the listener’s hostname) and attaches
the generated Secret to the listener.
-
Type:
attribute set of string -
Default:
{ } -
Example:
1{2example-com = "letsencrypt-example-com";3}
listeners
Section titled “listeners”Gateway API v1 Listener entries for the Gateway’s spec.listeners,
with the upstream field names. An HTTPS listener with no
tls.certificateRefs is a placeholder and is not rendered.
For listener ports below 1024, Envoy binds to container port
port + 10000 (for example, port 80 maps to 10080) unless
proxySpec.provider.kubernetes.useListenerPortAsContainerPort is
true. When network policy is enabled, the package allows incoming
client traffic to those container ports.
kix.expose reads the rendered listeners: protocol, hostname,
port, and allowedRoutes.namespaces.from decide whether an
HTTPRoute can attach and which URL scheme and port it gets.
-
Type:
list of (submodule) -
Default:
1[2{3allowedRoutes = {4namespaces = {5from = "All";6};7};8name = "http";9port = 80;10protocol = "HTTP";11}12{13allowedRoutes = {14namespaces = {15from = "All";16};17};18name = "https";19port = 443;20protocol = "HTTPS";21tls = {22certificateRefs = [ ];23mode = "Terminate";24};25}26]
listeners.*.allowedRoutes
Section titled “listeners.*.allowedRoutes”- Type:
null or (submodule) - Default:
null
listeners.*.allowedRoutes.kinds
Section titled “listeners.*.allowedRoutes.kinds”- Type:
null or (list of attribute set of anything) - Default:
null
listeners.*.allowedRoutes.namespaces
Section titled “listeners.*.allowedRoutes.namespaces”- Type:
null or (submodule) - Default:
null
listeners.*.allowedRoutes.namespaces.from
Section titled “listeners.*.allowedRoutes.namespaces.from”- Type:
null or one of "All", "Same", "Selector" - Default:
null
listeners.*.allowedRoutes.namespaces.selector
Section titled “listeners.*.allowedRoutes.namespaces.selector”- Type:
null or (attribute set of anything) - Default:
null
listeners.*.hostname
Section titled “listeners.*.hostname”- Type:
null or string - Default:
null
listeners.*.name
Section titled “listeners.*.name”- Type:
string
listeners.*.port
Section titled “listeners.*.port”- Type:
16 bit unsigned integer; between 0 and 65535 (both inclusive)
listeners.*.protocol
Section titled “listeners.*.protocol”- Type:
one of "HTTP", "HTTPS", "TLS", "TCP", "UDP"
listeners.*.tls
Section titled “listeners.*.tls”- Type:
null or (submodule) - Default:
null
listeners.*.tls.certificateRefs
Section titled “listeners.*.tls.certificateRefs”- Type:
null or (list of attribute set of anything) - Default:
null
listeners.*.tls.frontendValidation
Section titled “listeners.*.tls.frontendValidation”- Type:
null or (attribute set of anything) - Default:
null
listeners.*.tls.mode
Section titled “listeners.*.tls.mode”- Type:
null or one of "Terminate", "Passthrough" - Default:
null
listeners.*.tls.options
Section titled “listeners.*.tls.options”- Type:
null or (attribute set of string) - Default:
null
metrics.enabled
Section titled “metrics.enabled”Enable metrics endpoint and monitoring resources (ServiceMonitor, PrometheusRules) when prometheus is available.
- Type:
boolean - Default:
true
metrics.interval
Section titled “metrics.interval”Scrape interval (e.g. ”30s”). Null = use Prometheus default.
- Type:
null or string - Default:
null
proxySpec
Section titled “proxySpec”EnvoyProxy spec fields (gateway.envoyproxy.io/v1alpha1) merged
into this Gateway’s EnvoyProxy resource.
By default, the package sets provider.type = "Kubernetes", the
Envoy image from envoy-gateway-controller (operandImages.envoy), the
replica count from the cluster’s availability level
(provider.kubernetes.envoyDeployment.replicas), pod topology spread
constraints and a PodDisruptionBudget when running multiple
replicas, and the proxy Service type (NodePort when
cluster.roles.loadBalancer.binding = "absent", or LoadBalancer
otherwise).
You can override the replica count, Service type, and other
EnvoyProxy fields here. Kix rejects overrides to provider.type
(must be "Kubernetes"),
provider.kubernetes.envoyDeployment.container.image (set
operandImages.envoy on envoy-gateway-controller instead),
provider.kubernetes.envoyDeployment.pod.topologySpreadConstraints,
and mergeGateways.
-
Type:
attribute set of anything -
Default:
{ } -
Example:
1{2provider.kubernetes.envoyService.annotations."service.beta.kubernetes.io/aws-load-balancer-type" = "nlb";3logging.level.default = "info";4}
securityPolicy
Section titled “securityPolicy”Envoy Gateway SecurityPolicy spec fields
(gateway.envoyproxy.io/v1alpha1) applied to every route on this
Gateway unless overridden by a route-level policy. When non-empty,
the package creates a SecurityPolicy attached to this Gateway. Kix
rejects targetRef, targetRefs, and targetSelectors.
Use authorization with principal.clientCIDRs to restrict access by
client IP range. Envoy Gateway evaluates the connection’s source IP, or
the client IP extracted via clientTrafficPolicy.clientIPDetection
from a trusted proxy.
-
Type:
attribute set of anything -
Default:
{ } -
Example:
1{2authorization = {3defaultAction = "Deny";4rules = [5{6action = "Allow";7principal.clientCIDRs = [ "10.0.0.0/8" ];8}9];10};11}