homek8s/apps/base/customer1/httproute.yaml

44 lines
1.2 KiB
YAML
Raw Normal View History

# Two separate HTTPRoutes and two separate Gateways, on purpose.
#
# A hostname-less route answers on the bare WireGuard address
# (http://10.10.0.2:8086/ and :8087/) for ANY Host header, because a phone
# cannot edit /etc/hosts. Cilium renders ONE RouteConfiguration per Gateway and
# merges every hostname-less route in it into a single weighted route, so two
# services sharing one Gateway serve each other's traffic at random regardless
# of listener port. Hence gateway-customer1-odoo.yaml (8086) and
# gateway-customer1-metabase.yaml (8087) in infrastructure/networking/internal/.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: odoo
namespace: customer1
spec:
parentRefs:
- name: customer1-odoo
namespace: internal
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: odoo
port: 8069
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: metabase
namespace: customer1
spec:
parentRefs:
- name: customer1-metabase
namespace: internal
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: metabase
port: 3000