mirror of
https://github.com/alibaba/higress.git
synced 2026-03-10 11:40:49 +08:00
66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
apiVersion: gateway.networking.k8s.io/v1alpha2
|
|
kind: GatewayClass
|
|
metadata:
|
|
name: higress
|
|
spec:
|
|
controllerName: higress.io/gateway-controller
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
|
kind: Gateway
|
|
metadata:
|
|
name: third-party-gateway
|
|
namespace: higress-system
|
|
spec:
|
|
addresses:
|
|
- value: higress-gateway
|
|
type: Hostname
|
|
gatewayClassName: third-party-gatewayclass
|
|
listeners:
|
|
- name: default
|
|
hostname: "*.domain.example"
|
|
port: 80
|
|
protocol: HTTP
|
|
allowedRoutes:
|
|
namespaces:
|
|
from: All
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
|
kind: Gateway
|
|
metadata:
|
|
name: gateway
|
|
namespace: higress-system
|
|
annotations:
|
|
gateway.higress.io/alias-for: third-party-gateway
|
|
spec:
|
|
addresses:
|
|
- value: higress-gateway
|
|
type: Hostname
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: default
|
|
hostname: "*.domain.example"
|
|
port: 80
|
|
protocol: HTTP
|
|
allowedRoutes:
|
|
namespaces:
|
|
from: All
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1alpha2
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: http
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- name: third-party-gateway
|
|
namespace: higress-system
|
|
hostnames: ["first.domain.example", "another.domain.example"]
|
|
rules:
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /
|
|
backendRefs:
|
|
- name: httpbin
|
|
port: 80
|