Skip to content

Commit 9c478c1

Browse files
authored
Add seed corpus related to traffic task. (#5947)
* Add seed corpus related to traffic task. Signed-off-by: sudipto baral <[email protected]>
1 parent 46e053b commit 9c478c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1640
-72
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v1
2+
kind: Secret
3+
type: Opaque
4+
metadata:
5+
name: apikey-secret
6+
stringData:
7+
client1: supersecret
8+
---
9+
apiVersion: gateway.envoyproxy.io/v1alpha1
10+
kind: SecurityPolicy
11+
metadata:
12+
name: apikey-auth-example
13+
spec:
14+
targetRefs:
15+
- group: gateway.networking.k8s.io
16+
kind: HTTPRoute
17+
name: backend
18+
apiKeyAuth:
19+
credentialRefs:
20+
- group: ""
21+
kind: Secret
22+
name: apikey-secret
23+
extractFrom:
24+
- headers:
25+
- x-api-key
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: envoy-gateway-config
6+
namespace: envoy-gateway-system
7+
data:
8+
envoy-gateway.yaml: |
9+
apiVersion: gateway.envoyproxy.io/v1alpha1
10+
kind: EnvoyGateway
11+
provider:
12+
type: Kubernetes
13+
gateway:
14+
controllerName: gateway.envoyproxy.io/gatewayclass-controller
15+
extensionApis:
16+
enableBackend: true
17+
---
18+
apiVersion: gateway.networking.k8s.io/v1
19+
kind: HTTPRoute
20+
metadata:
21+
name: backend
22+
spec:
23+
parentRefs:
24+
- name: eg
25+
hostnames:
26+
- "www.example.com"
27+
rules:
28+
- backendRefs:
29+
- group: gateway.envoyproxy.io
30+
kind: Backend
31+
name: httpbin
32+
matches:
33+
- path:
34+
type: PathPrefix
35+
value: /
36+
---
37+
apiVersion: gateway.envoyproxy.io/v1alpha1
38+
kind: Backend
39+
metadata:
40+
name: httpbin
41+
namespace: default
42+
spec:
43+
endpoints:
44+
- fqdn:
45+
hostname: httpbin.org
46+
port: 80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: gateway.envoyproxy.io/v1alpha1
3+
kind: SecurityPolicy
4+
metadata:
5+
name: basic-auth-example
6+
spec:
7+
targetRefs:
8+
- group: gateway.networking.k8s.io
9+
kind: HTTPRoute
10+
name: backend
11+
basicAuth:
12+
users:
13+
name: "basic-auth"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: gateway.envoyproxy.io/v1alpha1
3+
kind: BackendTrafficPolicy
4+
metadata:
5+
name: circuitbreaker-for-route
6+
spec:
7+
targetRefs:
8+
- group: gateway.networking.k8s.io
9+
kind: HTTPRoute
10+
name: backend
11+
circuitBreaker:
12+
maxPendingRequests: 0
13+
maxParallelRequests: 10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
apiVersion: gateway.envoyproxy.io/v1alpha1
3+
kind: ClientTrafficPolicy
4+
metadata:
5+
name: enable-tcp-keepalive-policy
6+
namespace: default
7+
spec:
8+
targetRefs:
9+
- group: gateway.networking.k8s.io
10+
kind: Gateway
11+
name: eg
12+
tcpKeepalive:
13+
idleTime: 20m
14+
interval: 60s
15+
probes: 3
16+
17+
---
18+
apiVersion: gateway.envoyproxy.io/v1alpha1
19+
kind: ClientTrafficPolicy
20+
metadata:
21+
name: enable-proxy-protocol-policy
22+
namespace: default
23+
spec:
24+
targetRefs:
25+
- group: gateway.networking.k8s.io
26+
kind: Gateway
27+
name: eg
28+
enableProxyProtocol: true
29+
30+
---
31+
apiVersion: gateway.envoyproxy.io/v1alpha1
32+
kind: ClientTrafficPolicy
33+
metadata:
34+
name: http-client-ip-detection
35+
namespace: default
36+
spec:
37+
targetRefs:
38+
- group: gateway.networking.k8s.io
39+
kind: Gateway
40+
name: eg
41+
clientIPDetection:
42+
xForwardedFor:
43+
numTrustedHops: 2
44+
45+
---
46+
apiVersion: gateway.envoyproxy.io/v1alpha1
47+
kind: ClientTrafficPolicy
48+
metadata:
49+
name: client-timeout
50+
spec:
51+
targetRefs:
52+
- group: gateway.networking.k8s.io
53+
kind: Gateway
54+
name: eg
55+
timeout:
56+
http:
57+
requestReceivedTimeout: 2s
58+
59+
---
60+
apiVersion: gateway.envoyproxy.io/v1alpha1
61+
kind: ClientTrafficPolicy
62+
metadata:
63+
name: client-timeout
64+
spec:
65+
targetRefs:
66+
- group: gateway.networking.k8s.io
67+
kind: Gateway
68+
name: eg
69+
timeout:
70+
http:
71+
idleTimeout: 5s
72+
73+
---
74+
apiVersion: gateway.envoyproxy.io/v1alpha1
75+
kind: ClientTrafficPolicy
76+
metadata:
77+
name: client-timeout
78+
spec:
79+
targetRefs:
80+
- group: gateway.networking.k8s.io
81+
kind: Gateway
82+
name: eg
83+
connection:
84+
bufferLimit: 1024

test/fuzz/testdata/FuzzGatewayAPIToXDS/configmap

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: gateway.envoyproxy.io/v1alpha1
3+
kind: ClientTrafficPolicy
4+
metadata:
5+
name: connection-limit-ctp
6+
namespace: default
7+
spec:
8+
targetRefs:
9+
- group: gateway.networking.k8s.io
10+
kind: Gateway
11+
name: eg
12+
connection:
13+
connectionLimit:
14+
value: 5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
apiVersion: gateway.envoyproxy.io/v1alpha1
3+
kind: SecurityPolicy
4+
metadata:
5+
name: cors-example
6+
spec:
7+
targetRefs:
8+
- group: gateway.networking.k8s.io
9+
kind: HTTPRoute
10+
name: backend
11+
cors:
12+
allowOrigins:
13+
- "http://*.foo.com"
14+
- "http://*.foo.com:80"
15+
allowMethods:
16+
- GET
17+
- POST
18+
allowHeaders:
19+
- "x-header-1"
20+
- "x-header-2"
21+
exposeHeaders:
22+
- "x-header-3"
23+
- "x-header-4"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
apiVersion: gateway.networking.k8s.io/v1
3+
kind: HTTPRoute
4+
metadata:
5+
name: direct-response
6+
spec:
7+
parentRefs:
8+
- name: eg
9+
hostnames:
10+
- "www.example.com"
11+
rules:
12+
- matches:
13+
- path:
14+
type: PathPrefix
15+
value: /inline
16+
filters:
17+
- type: ExtensionRef
18+
extensionRef:
19+
group: gateway.envoyproxy.io
20+
kind: HTTPRouteFilter
21+
name: direct-response-inline
22+
- matches:
23+
- path:
24+
type: PathPrefix
25+
value: /value-ref
26+
filters:
27+
- type: ExtensionRef
28+
extensionRef:
29+
group: gateway.envoyproxy.io
30+
kind: HTTPRouteFilter
31+
name: direct-response-value-ref
32+
---
33+
apiVersion: v1
34+
kind: ConfigMap
35+
metadata:
36+
name: value-ref-response
37+
data:
38+
response.body: '{"error": "Internal Server Error"}'
39+
---
40+
apiVersion: gateway.envoyproxy.io/v1alpha1
41+
kind: HTTPRouteFilter
42+
metadata:
43+
name: direct-response-inline
44+
spec:
45+
directResponse:
46+
contentType: text/plain
47+
statusCode: 503
48+
body:
49+
type: Inline
50+
inline: "Oops! Your request is not found."
51+
---
52+
apiVersion: gateway.envoyproxy.io/v1alpha1
53+
kind: HTTPRouteFilter
54+
metadata:
55+
name: direct-response-value-ref
56+
spec:
57+
directResponse:
58+
contentType: application/json
59+
statusCode: 500
60+
body:
61+
type: ValueRef
62+
valueRef:
63+
group: ""
64+
kind: ConfigMap
65+
name: value-ref-response
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
apiVersion: gateway.envoyproxy.io/v1alpha1
3+
kind: EnvoyPatchPolicy
4+
metadata:
5+
name: custom-response-patch-policy
6+
namespace: default
7+
spec:
8+
targetRef:
9+
group: gateway.networking.k8s.io
10+
kind: Gateway
11+
name: eg
12+
type: JSONPatch
13+
jsonPatches:
14+
- type: "type.googleapis.com/envoy.config.listener.v3.Listener"
15+
# The listener name is of the form <GatewayNamespace>/<GatewayName>/<GatewayListenerName>
16+
name: default/eg/http
17+
operation:
18+
op: add
19+
path: "/default_filter_chain/filters/0/typed_config/local_reply_config"
20+
value:
21+
mappers:
22+
- filter:
23+
status_code_filter:
24+
comparison:
25+
op: EQ
26+
value:
27+
default_value: 404
28+
runtime_key: key_b
29+
status_code: 406
30+
body:
31+
inline_string: "could not find what you are looking for"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
apiVersion: gateway.networking.k8s.io/v1
3+
kind: HTTPRoute
4+
metadata:
5+
name: myapp
6+
spec:
7+
parentRefs:
8+
- name: eg
9+
hostnames:
10+
- "www.example.com"
11+
rules:
12+
- matches:
13+
- path:
14+
type: PathPrefix
15+
value: /myapp
16+
backendRefs:
17+
- name: backend
18+
port: 3000
19+
20+
---
21+
apiVersion: gateway.envoyproxy.io/v1alpha1
22+
kind: EnvoyExtensionPolicy
23+
metadata:
24+
name: ext-proc-example
25+
spec:
26+
targetRefs:
27+
- group: gateway.networking.k8s.io
28+
kind: HTTPRoute
29+
name: myapp
30+
extProc:
31+
- backendRefs:
32+
- name: grpc-ext-proc
33+
port: 9002
34+
processingMode:
35+
request: {}
36+
response:
37+
body: Streamed
38+
39+
---
40+
apiVersion: gateway.networking.k8s.io/v1alpha3
41+
kind: BackendTLSPolicy
42+
metadata:
43+
name: grpc-ext-proc-btls
44+
spec:
45+
targetRefs:
46+
- group: ''
47+
kind: Service
48+
name: grpc-ext-proc
49+
validation:
50+
caCertificateRefs:
51+
- name: grpc-ext-proc-ca
52+
group: ''
53+
kind: ConfigMap
54+
hostname: grpc-ext-proc.envoygateway

0 commit comments

Comments
 (0)