mirror of
https://github.com/alibaba/higress.git
synced 2026-05-22 19:57:29 +08:00
388 lines
7.5 KiB
YAML
388 lines
7.5 KiB
YAML
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: GatewayClass
|
|
metadata:
|
|
name: higress
|
|
spec:
|
|
controllerName: higress.io/gateway-controller
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: gateway
|
|
namespace: higress-system
|
|
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/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: invalid-service
|
|
namespace: higress-system
|
|
spec:
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: default
|
|
hostname: "*.example"
|
|
port: 80
|
|
protocol: HTTP
|
|
addresses:
|
|
- value: fake-service.com
|
|
type: Hostname
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: target-port-reference
|
|
namespace: higress-system
|
|
spec:
|
|
addresses:
|
|
- value: higress-gateway
|
|
type: Hostname
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: default
|
|
hostname: "*.example"
|
|
port: 8080 # Test service has port 80 with targetPort 8080
|
|
protocol: HTTP
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: invalid-gateway-address
|
|
namespace: invalid-gateway-address
|
|
spec:
|
|
gatewayClassName: higress
|
|
addresses:
|
|
- value: 1.2.3.4
|
|
type: istio.io/FakeType
|
|
listeners:
|
|
- name: default
|
|
hostname: "*.domain.example"
|
|
port: 80
|
|
protocol: HTTP
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: invalid-cert-kind
|
|
namespace: higress-system
|
|
spec:
|
|
addresses:
|
|
- value: higress-gateway
|
|
type: Hostname
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: default
|
|
hostname: "domain.example"
|
|
port: 34000
|
|
protocol: HTTPS
|
|
tls:
|
|
mode: Terminate
|
|
certificateRefs:
|
|
- name: my-cert-http
|
|
group: core
|
|
kind: unknown
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: invalid-cert-notfound
|
|
namespace: higress-system
|
|
spec:
|
|
addresses:
|
|
- value: higress-gateway
|
|
type: Hostname
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: default
|
|
hostname: "domain.example"
|
|
port: 34001
|
|
protocol: HTTPS
|
|
tls:
|
|
mode: Terminate
|
|
certificateRefs:
|
|
- name: nonexistent
|
|
kind: Secret
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: invalid-cert-malformed
|
|
namespace: higress-system
|
|
spec:
|
|
addresses:
|
|
- value: higress-gateway
|
|
type: Hostname
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: default
|
|
hostname: "domain.example"
|
|
port: 34002
|
|
protocol: HTTPS
|
|
tls:
|
|
mode: Terminate
|
|
certificateRefs:
|
|
- name: malformed
|
|
kind: Secret
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: udp-protocol
|
|
namespace: higress-system
|
|
spec:
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: udp
|
|
port: 1234
|
|
protocol: UDP
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: unknown-protocol
|
|
namespace: higress-system
|
|
spec:
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: unknown
|
|
port: 1234
|
|
protocol: unknown
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: protocol-lower-case
|
|
namespace: higress-system
|
|
spec:
|
|
gatewayClassName: higress
|
|
listeners:
|
|
- name: http
|
|
port: 1234
|
|
protocol: http
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-backendRef-kind
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- name: gateway
|
|
namespace: higress-system
|
|
hostnames: ["first.domain.example"]
|
|
rules:
|
|
- backendRefs:
|
|
- name: httpbin
|
|
kind: GcsBucket
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-backendRef-notfound
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- name: gateway
|
|
namespace: higress-system
|
|
hostnames: ["second.domain.example"]
|
|
rules:
|
|
- backendRefs:
|
|
- name: nonexistent
|
|
port: 80
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-backendRef-mixed
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- name: gateway
|
|
namespace: higress-system
|
|
hostnames: ["third.domain.example"]
|
|
rules:
|
|
- backendRefs:
|
|
- name: nonexistent
|
|
port: 80
|
|
weight: 1
|
|
- name: httpbin
|
|
port: 80
|
|
weight: 1
|
|
- name: httpbin
|
|
kind: GcsBucket
|
|
weight: 1
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-mirror
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- name: gateway
|
|
namespace: higress-system
|
|
rules:
|
|
- filters:
|
|
- type: RequestMirror
|
|
requestMirror:
|
|
backendRef:
|
|
kind: no-support
|
|
name: httpbin-mirror
|
|
port: 80
|
|
backendRefs:
|
|
- name: httpbin
|
|
port: 80
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: no-backend
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: httpbin
|
|
rules:
|
|
- filters:
|
|
- type: RequestMirror
|
|
requestMirror:
|
|
backendRef:
|
|
name: httpbin
|
|
port: 80
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-parentRef-port
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- name: gateway
|
|
namespace: higress-system
|
|
port: 1234
|
|
hostnames: ["first.domain.example"]
|
|
rules:
|
|
- backendRefs:
|
|
- name: httpbin
|
|
port: 80
|
|
weight: 1
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-sectionname-port
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- name: gateway
|
|
namespace: higress-system
|
|
sectionName: fake
|
|
hostnames: ["first.domain.example"]
|
|
rules:
|
|
- backendRefs:
|
|
- name: httpbin
|
|
port: 80
|
|
weight: 1
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-parentRef-service
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: not-found
|
|
rules:
|
|
- backendRefs:
|
|
- name: httpbin
|
|
port: 80
|
|
weight: 1
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-parentRef-service-entry
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- group: "networking.istio.io"
|
|
kind: ServiceEntry
|
|
name: not-found
|
|
rules:
|
|
- backendRefs:
|
|
- name: httpbin
|
|
port: 80
|
|
weight: 1
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-backendRef-hostname
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: httpbin
|
|
rules:
|
|
- backendRefs:
|
|
- name: unknown.example.com
|
|
kind: Hostname
|
|
group: networking.istio.io
|
|
port: 80
|
|
weight: 1
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-backendRef-serviceimport
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: httpbin
|
|
rules:
|
|
- backendRefs:
|
|
- group: multicluster.x-k8s.io
|
|
kind: ServiceImport
|
|
name: unknown-service-import
|
|
port: 80
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: invalid-backendRef-mirror
|
|
namespace: default
|
|
spec:
|
|
parentRefs:
|
|
- group: ""
|
|
kind: Service
|
|
name: httpbin
|
|
rules:
|
|
- filters:
|
|
- type: RequestMirror
|
|
requestMirror:
|
|
backendRef:
|
|
name: does-not-exist
|
|
port: 80
|
|
backendRefs:
|
|
- name: httpbin
|
|
port: 80
|
|
weight: 1
|