Listener Configuration

Gateway definitions set up the protocols and ports on which Gloo Gateway listens for traffic. For example, by default Gloo Gateway will have a gateway configured for HTTP and HTTPS traffic. Gloo Gateway allows you to configure properties of your gateways with several plugins.

These guides show you how to apply these advanced listener configurations to refine your gateways' behavior.


Overview

For demonstration purposes, let’s edit the default gateways that are installed with glooctl install gateway. You can list and edit gateways with kubectl.

kubectl get gateway --all-namespaces
NAMESPACE     NAME                AGE
gloo-system   gateway-proxy       2d
gloo-system   gateway-proxy-ssl   2d
kubectl edit gateway -n gloo-system gateway-proxy

Plugin summary

The listener plugin portion of the gateway Custom Resource (CR) is shown below.

apiVersion: gateway.solo.io/v1
kind: Gateway
metadata: # collapsed for brevity
spec:
  bindAddress: '::'
  bindPort: 8080
  httpGateway:
    options:
      grpcWeb:
        disable: true
      httpConnectionManagerSettings:
        via: reference-string
  useProxyProto: false
status: # collapsed for brevity

Verify your configuration

To verify that your configuration was accepted, inspect the proxy.

glooctl get proxy -n gloo-system gateway-proxy -o yaml
...
  spec:
    listeners:
    - bindAddress: '::'
      bindPort: 8080
      httpListener:
        options:
          grpcWeb:
            disable: true
          httpConnectionManagerSettings:
            via: reference-string
        virtualHosts:
        - domains:
          - '*'
          name: gloo-system.merged-*
        - domains:
          - solo.io
          name: gloo-system.myvs3
      name: listener-::-8080
      useProxyProto: false
    - bindAddress: '::'
      bindPort: 8443
      httpListener: {}
      name: listener-::-8443
      useProxyProto: false
  status: # collapsed for brevity
kind: List
metadata: # collapsed for brevity

Next Steps

The guide above showed some basics on how to manipulate settings for the gateway listener in Gloo Gateway. The following guides provide additional detail around what you may want to change in the gateway CR and how to do so.