Skip to content

Commit a3c259a

Browse files
committed
docs: Attach EnvoyProxy to Gateway
Fixes: envoyproxy#3639 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
1 parent 14d3b5d commit a3c259a

File tree

3 files changed

+251
-94
lines changed

3 files changed

+251
-94
lines changed

site/content/en/docs/tasks/operations/customize-envoyproxy.md

Lines changed: 84 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,67 @@ title: "Customize EnvoyProxy"
33
---
44

55
Envoy Gateway provides an [EnvoyProxy][] CRD that can be linked to the ParametersRef
6-
in GatewayClass, allowing cluster admins to customize the managed EnvoyProxy Deployment and
6+
in a Gateway and GatewayClass, allowing cluster admins to customize the managed EnvoyProxy Deployment and
77
Service. To learn more about GatewayClass and ParametersRef, please refer to [Gateway API documentation][].
88

99
## Prerequisites
1010

11-
Follow the steps from the [Quickstart](../../quickstart) to install Envoy Gateway and the example manifest.
12-
Before proceeding, you should be able to query the example backend using HTTP.
11+
{{< boilerplate prerequisites >}}
1312

14-
Before you start, you need to add `ParametersRef` in GatewayClass, and refer to EnvoyProxy Config:
13+
Before you start, you need to add `Infrastructure.ParametersRef` in Gateway, and refer to EnvoyProxy Config:
14+
**Note**: `MergeGateways` cannot be set to `true` in your EnvoyProxy config if attaching to the Gateway.
15+
16+
{{< tabpane text=true >}}
17+
{{% tab header="Apply from stdin" %}}
18+
```shell
19+
cat <<EOF | kubectl apply -f -
20+
apiVersion: gateway.networking.k8s.io/v1
21+
kind: Gateway
22+
metadata:
23+
name: eg
24+
spec:
25+
gatewayClassName: eg
26+
infrastructure:
27+
parametersRef:
28+
group: gateway.envoyproxy.io
29+
kind: EnvoyProxy
30+
name: custom-proxy-config
31+
listeners:
32+
- name: http
33+
protocol: HTTP
34+
port: 80
35+
EOF
36+
```
37+
38+
{{% /tab %}}
39+
{{% tab header="Apply from file" %}}
40+
Save and apply the following resource to your cluster:
41+
42+
```yaml
43+
---
44+
apiVersion: gateway.networking.k8s.io/v1
45+
kind: Gateway
46+
metadata:
47+
name: eg
48+
spec:
49+
gatewayClassName: eg
50+
infrastructure:
51+
parametersRef:
52+
group: gateway.envoyproxy.io
53+
kind: EnvoyProxy
54+
name: custom-proxy-config
55+
listeners:
56+
- name: http
57+
protocol: HTTP
58+
port: 80
59+
```
60+
61+
{{% /tab %}}
62+
{{< /tabpane >}}
63+
64+
You can also attach the EnvoyProxy resource to the GatewayClass using the `parametersRef` field.
65+
This configuration is discouraged if you plan on creating multiple Gateways linking to the same
66+
GatewayClass and would like different infrastructure configurations for each of them.
1567

1668
{{< tabpane text=true >}}
1769
{{% tab header="Apply from stdin" %}}
@@ -28,7 +80,7 @@ spec:
2880
group: gateway.envoyproxy.io
2981
kind: EnvoyProxy
3082
name: custom-proxy-config
31-
namespace: envoy-gateway-system
83+
namespace: default
3284
EOF
3385
```
3486

@@ -48,7 +100,7 @@ spec:
48100
group: gateway.envoyproxy.io
49101
kind: EnvoyProxy
50102
name: custom-proxy-config
51-
namespace: envoy-gateway-system
103+
namespace: default
52104
```
53105

54106
{{% /tab %}}
@@ -67,7 +119,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
67119
kind: EnvoyProxy
68120
metadata:
69121
name: custom-proxy-config
70-
namespace: envoy-gateway-system
122+
namespace: default
71123
spec:
72124
provider:
73125
type: Kubernetes
@@ -87,7 +139,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
87139
kind: EnvoyProxy
88140
metadata:
89141
name: custom-proxy-config
90-
namespace: envoy-gateway-system
142+
namespace: default
91143
spec:
92144
provider:
93145
type: Kubernetes
@@ -119,7 +171,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
119171
kind: EnvoyProxy
120172
metadata:
121173
name: custom-proxy-config
122-
namespace: envoy-gateway-system
174+
namespace: default
123175
spec:
124176
provider:
125177
type: Kubernetes
@@ -140,7 +192,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
140192
kind: EnvoyProxy
141193
metadata:
142194
name: custom-proxy-config
143-
namespace: envoy-gateway-system
195+
namespace: default
144196
spec:
145197
provider:
146198
type: Kubernetes
@@ -168,7 +220,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
168220
kind: EnvoyProxy
169221
metadata:
170222
name: custom-proxy-config
171-
namespace: envoy-gateway-system
223+
namespace: default
172224
spec:
173225
provider:
174226
type: Kubernetes
@@ -191,7 +243,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
191243
kind: EnvoyProxy
192244
metadata:
193245
name: custom-proxy-config
194-
namespace: envoy-gateway-system
246+
namespace: default
195247
spec:
196248
provider:
197249
type: Kubernetes
@@ -221,7 +273,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
221273
kind: EnvoyProxy
222274
metadata:
223275
name: custom-proxy-config
224-
namespace: envoy-gateway-system
276+
namespace: default
225277
spec:
226278
provider:
227279
type: Kubernetes
@@ -248,7 +300,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
248300
kind: EnvoyProxy
249301
metadata:
250302
name: custom-proxy-config
251-
namespace: envoy-gateway-system
303+
namespace: default
252304
spec:
253305
provider:
254306
type: Kubernetes
@@ -280,7 +332,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
280332
kind: EnvoyProxy
281333
metadata:
282334
name: custom-proxy-config
283-
namespace: envoy-gateway-system
335+
namespace: default
284336
spec:
285337
provider:
286338
type: Kubernetes
@@ -305,7 +357,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
305357
kind: EnvoyProxy
306358
metadata:
307359
name: custom-proxy-config
308-
namespace: envoy-gateway-system
360+
namespace: default
309361
spec:
310362
provider:
311363
type: Kubernetes
@@ -339,7 +391,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
339391
kind: EnvoyProxy
340392
metadata:
341393
name: custom-proxy-config
342-
namespace: envoy-gateway-system
394+
namespace: default
343395
spec:
344396
provider:
345397
type: Kubernetes
@@ -368,7 +420,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
368420
kind: EnvoyProxy
369421
metadata:
370422
name: custom-proxy-config
371-
namespace: envoy-gateway-system
423+
namespace: default
372424
spec:
373425
provider:
374426
type: Kubernetes
@@ -404,7 +456,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
404456
kind: EnvoyProxy
405457
metadata:
406458
name: custom-proxy-config
407-
namespace: envoy-gateway-system
459+
namespace: default
408460
spec:
409461
provider:
410462
type: Kubernetes
@@ -426,7 +478,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
426478
kind: EnvoyProxy
427479
metadata:
428480
name: custom-proxy-config
429-
namespace: envoy-gateway-system
481+
namespace: default
430482
spec:
431483
provider:
432484
type: Kubernetes
@@ -459,7 +511,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
459511
kind: EnvoyProxy
460512
metadata:
461513
name: custom-proxy-config
462-
namespace: envoy-gateway-system
514+
namespace: default
463515
spec:
464516
bootstrap:
465517
type: Replace
@@ -547,7 +599,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
547599
kind: EnvoyProxy
548600
metadata:
549601
name: custom-proxy-config
550-
namespace: envoy-gateway-system
602+
namespace: default
551603
spec:
552604
bootstrap:
553605
type: Replace
@@ -649,7 +701,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
649701
kind: EnvoyProxy
650702
metadata:
651703
name: custom-proxy-config
652-
namespace: envoy-gateway-system
704+
namespace: default
653705
spec:
654706
provider:
655707
type: Kubernetes
@@ -677,7 +729,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
677729
kind: EnvoyProxy
678730
metadata:
679731
name: custom-proxy-config
680-
namespace: envoy-gateway-system
732+
namespace: default
681733
spec:
682734
provider:
683735
type: Kubernetes
@@ -713,7 +765,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
713765
kind: EnvoyProxy
714766
metadata:
715767
name: custom-proxy-config
716-
namespace: envoy-gateway-system
768+
namespace: default
717769
spec:
718770
extraArgs:
719771
- --disable-extensions envoy.access_loggers/envoy.access_loggers.wasm
@@ -730,7 +782,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
730782
kind: EnvoyProxy
731783
metadata:
732784
name: custom-proxy-config
733-
namespace: envoy-gateway-system
785+
namespace: default
734786
spec:
735787
extraArgs:
736788
- --disable-extensions envoy.access_loggers/envoy.access_loggers.wasm
@@ -756,7 +808,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
756808
kind: EnvoyProxy
757809
metadata:
758810
name: eg
759-
namespace: envoy-gateway-system
811+
namespace: default
760812
spec:
761813
provider:
762814
type: Kubernetes
@@ -792,7 +844,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
792844
kind: EnvoyProxy
793845
metadata:
794846
name: eg
795-
namespace: envoy-gateway-system
847+
namespace: default
796848
spec:
797849
provider:
798850
type: Kubernetes
@@ -835,7 +887,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
835887
kind: EnvoyProxy
836888
metadata:
837889
name: eg
838-
namespace: envoy-gateway-system
890+
namespace: default
839891
spec:
840892
provider:
841893
type: Kubernetes
@@ -860,7 +912,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
860912
kind: EnvoyProxy
861913
metadata:
862914
name: eg
863-
namespace: envoy-gateway-system
915+
namespace: default
864916
spec:
865917
provider:
866918
type: Kubernetes
@@ -918,7 +970,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
918970
kind: EnvoyProxy
919971
metadata:
920972
name: custom-proxy-config
921-
namespace: envoy-gateway-system
973+
namespace: default
922974
spec:
923975
filterOrder:
924976
- name: envoy.filters.http.wasm
@@ -938,7 +990,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
938990
kind: EnvoyProxy
939991
metadata:
940992
name: custom-proxy-config
941-
namespace: envoy-gateway-system
993+
namespace: default
942994
spec:
943995
filterOrder:
944996
- name: envoy.filters.http.wasm

0 commit comments

Comments
 (0)