How to route traffic for multiple workloads through a single Gateway

The gateway-api-integrator charm manages a single Kubernetes Gateway resource and accepts multiple gateway-route relations. Eachingress-configurator instance handles exactly one workload, so to route traffic for multiple workloads through the same Gateway, deploy one ingress-configurator per workload and integrate them all to the same gateway-api-integrator instance.

This guide assumes you already have gateway-api-integrator deployed and configured. If not, begin by following How to add Kubernetes Gateway API features to an ingress requirer charm.

Deploy ingress-configurator for each workload

For each ingress requirer charm, deploy a dedicated ingress-configurator instance and give each a unique application name:

juju deploy ingress-configurator --channel=latest/stable --trust ingress-configurator-a
juju deploy ingress-configurator --channel=latest/stable --trust ingress-configurator-b

Configure relations

Integrate each ingress-configurator to gateway-api-integrator and to its corresponding workload:

juju integrate ingress-configurator-a:gateway-route gateway-api-integrator
juju integrate ingress-configurator-a:ingress <workload-charm-a>

juju integrate ingress-configurator-b:gateway-route gateway-api-integrator
juju integrate ingress-configurator-b:ingress <workload-charm-b>

Configure a distinct hostname for each instance:

juju config ingress-configurator-a hostname=<hostname-a>
juju config ingress-configurator-b hostname=<hostname-b>

Each ingress-configurator will create its own HTTPRoute resources pointing to its respective workload, all sharing the same Gateway.