Routing#
The routing sends the requests of the public hostname to the frontend and the backend.
routing.type selects the resources that it creates:
|
Resources |
Routes |
|---|---|---|
|
an HTTPRoute, attached to an existing Gateway |
Gateway API |
|
Ingress resources for the ingress-nginx controller |
ingress-nginx |
|
no routing resources |
your own routing |
Virtual host paths#
The backend requests are rewritten to a Zope virtual host path, with this format:
with Volto:
/VirtualHostBase/<scheme>/<hostname>:<port>/<site.id>/++api++/VirtualHostRootwith the Classic UI:
/VirtualHostBase/<scheme>/<hostname>:<port>/<site.id>/VirtualHostRoot
With routing.https set to false and the default port, the scheme is http and the port is 80.
For why the rewrite exists, see The Zope virtual host rewrite.
Gateway API routing#
With routing.type: gateway, the chart creates the HTTPRoute <release>, with these rules:
Scenario |
Match |
Rewrite |
Backend |
|---|---|---|---|
Volto |
|
prefix replaced with the virtual host path |
|
Volto |
|
none |
|
Classic UI |
|
prefix replaced with the virtual host path |
|
The route uses the hostname routing.hostname.
The rewrite uses the ReplacePrefixMatch type, from the standard channel of the Gateway API.
The Gateway options are:
routing:
gateway:
# The Gateway to attach to. Required, unless parentRefs is set.
name: ""
# Namespace of the Gateway. Defaults to the namespace of the release.
namespace: ""
# Listener of the Gateway, such as http or https. Defaults to all the
# listeners that accept the route.
sectionName: ""
# Gateways to attach to, as Gateway API parentRefs. Takes precedence over
# name, namespace, and sectionName.
parentRefs: []
# Annotations of the HTTPRoute.
annotations: {}
Each parentRefs entry is a Gateway API parent reference, with name, namespace, and sectionName.
With routing.type: gateway, the chart fails to install when neither routing.gateway.name nor routing.gateway.parentRefs is set.
ingress-nginx resources#
With routing.type: ingress-nginx, the chart creates the following Ingress resources, for the routing.ingressNginx.className class (default nginx):
Resource |
Scenario |
Path |
Backend |
Annotations |
|---|---|---|---|---|
|
Volto only |
|
backend or Varnish |
|
|
Volto |
|
frontend or Varnish |
|
|
Classic UI |
|
backend or Varnish |
|
The annotations in routing.ingressNginx.annotations are added to all the Ingress resources, for example for cert-manager.
routing.ingressNginx.tls sets the tls section of all the Ingress resources.
The chart doesn’t use snippet annotations, which recent ingress-nginx versions reject by default.
When an Ingress with the use-regex annotation exists for a host, ingress-nginx treats the paths of all the Ingress resources of that host as regular expressions.
The paths created by this chart work either way.
For a step-by-step installation, see How to route the site with ingress-nginx.