mirror of
https://github.com/alibaba/higress.git
synced 2026-06-05 10:37:28 +08:00
support custom group in httproute (#561)
This commit is contained in:
55
samples/gateway-api/demo.yaml
Normal file
55
samples/gateway-api/demo.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1alpha2
|
||||
kind: GatewayClass
|
||||
metadata:
|
||||
name: higress-gateway
|
||||
spec:
|
||||
controllerName: "higress.io/gateway-controller"
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1alpha2
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: higress-gateway
|
||||
namespace: higress-system
|
||||
spec:
|
||||
gatewayClassName: higress-gateway
|
||||
listeners:
|
||||
- name: default
|
||||
hostname: "*.gateway-api.com"
|
||||
port: 80
|
||||
protocol: HTTP
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1alpha2
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: http
|
||||
namespace: default
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: higress-gateway
|
||||
namespace: higress-system
|
||||
hostnames: ["www.gateway-api.com"]
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
filters:
|
||||
- type: RequestHeaderModifier
|
||||
requestHeaderModifier:
|
||||
add:
|
||||
- name: my-added-header
|
||||
value: added-value-higress
|
||||
backendRefs:
|
||||
- name: foo-service
|
||||
port: 5678
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /by-nacos
|
||||
backendRefs:
|
||||
- name: service-provider.DEFAULT-GROUP.public.nacos
|
||||
group: networking.higress.io
|
||||
|
||||
Reference in New Issue
Block a user