Thanks to visit codestin.com
Credit goes to docs.rackspacecloud.com

Skip to content

Custom Listeners

This step is not needed if all listeners were applied when the Gateway API was deployed

Example listener patch file found in /opt/genestack/etc/gateway-api/listeners

Modify the Listener Patch

This example changes the placeholder domain to <YOUR_DOMAIN>. Review the gateway documentation for more information on listener types.

mkdir -p /etc/genestack/gateway-api/listeners
sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
    /opt/genestack/etc/gateway-api/listeners/<SERVICE_NAME>-https.json \
    > /etc/genestack/gateway-api/listeners/<SERVICE_NAME>-https.json

Apply the Listener Patch

kubectl patch -n nginx-gateway gateway flex-gateway \
              --type='json' \
              --patch-file /etc/genestack/gateway-api/listeners/<SERVICE_NAME>-https.json

Custom Routes

This step is not needed if all routes were applied when the Gateway API was deployed

A custom gateway route can be used when setting up the service. The custom route make it possible for a domain like your.domain.tld to be used.

Example routes file found in /opt/genestack/etc/gateway-api/routes

Modify the Route

This example changes the placeholder domain to <YOUR_DOMAIN>. Review the gateway route documentation for more information on route types.

mkdir -p /etc/genestack/gateway-api/routes
sed 's/your.domain.tld/<YOUR_DOMAIN>/g' \
    /opt/genestack/etc/gateway-api/routes/custom-<SERVICE_NAME>-gateway-route.yaml \
    > /etc/genestack/gateway-api/routes/custom-<SERVICE_NAME>-gateway-route.yaml

Apply the Route

kubectl --namespace openstack apply -f /etc/genestack/gateway-api/routes/custom-<SERVICE_NAME>-gateway-route.yaml