44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
# On the HUB's public Gateway: the public name, forwarded over Private Link to the spoke's internal
|
|
# Gateway. The same shape the catalog's kgateway-remote-route module creates.
|
|
#
|
|
# 10.20.255.100 is the hub's private endpoint to the spoke Gateway (crucible-hub-to-apps-lab-pe).
|
|
apiVersion: gateway.kgateway.dev/v1alpha1
|
|
kind: Backend
|
|
metadata:
|
|
name: demo-vivek-11
|
|
namespace: gatewayapi
|
|
spec:
|
|
type: Static
|
|
static:
|
|
hosts:
|
|
- host: 10.20.255.100
|
|
port: 80
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: demo-vivek-11
|
|
namespace: gatewayapi
|
|
spec:
|
|
parentRefs:
|
|
- name: pe-gatewayapi
|
|
namespace: gatewayapi
|
|
sectionName: https
|
|
hostnames:
|
|
- demo-vivek-11.apps.lab.crucible.kyndemo.live
|
|
rules:
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /
|
|
# The spoke only serves *.int.apps.lab; without the rewrite it answers 404.
|
|
filters:
|
|
- type: URLRewrite
|
|
urlRewrite:
|
|
hostname: demo-vivek-11.int.apps.lab.crucible.kyndemo.live
|
|
# No port: kgateway rejects one on a Backend ref (BackendNotFound); the Backend carries it.
|
|
backendRefs:
|
|
- name: demo-vivek-11
|
|
kind: Backend
|
|
group: gateway.kgateway.dev
|