Skip to content

Commit

Permalink
docs: Attach EnvoyProxy to Gateway
Browse files Browse the repository at this point in the history
Fixes: envoyproxy#3639

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit a3c259a)
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg committed Aug 8, 2024
1 parent 975b1e8 commit 80d433e
Show file tree
Hide file tree
Showing 3 changed files with 251 additions and 94 deletions.
116 changes: 84 additions & 32 deletions site/content/en/docs/tasks/operations/customize-envoyproxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,67 @@ title: "Customize EnvoyProxy"
---

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

## Prerequisites

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

Before you start, you need to add `ParametersRef` in GatewayClass, and refer to EnvoyProxy Config:
Before you start, you need to add `Infrastructure.ParametersRef` in Gateway, and refer to EnvoyProxy Config:
**Note**: `MergeGateways` cannot be set to `true` in your EnvoyProxy config if attaching to the Gateway.

{{< tabpane text=true >}}
{{% tab header="Apply from stdin" %}}
```shell
cat <<EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: eg
spec:
gatewayClassName: eg
infrastructure:
parametersRef:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: custom-proxy-config
listeners:
- name: http
protocol: HTTP
port: 80
EOF
```

{{% /tab %}}
{{% tab header="Apply from file" %}}
Save and apply the following resource to your cluster:

```yaml
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: eg
spec:
gatewayClassName: eg
infrastructure:
parametersRef:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: custom-proxy-config
listeners:
- name: http
protocol: HTTP
port: 80
```
{{% /tab %}}
{{< /tabpane >}}
You can also attach the EnvoyProxy resource to the GatewayClass using the `parametersRef` field.
This configuration is discouraged if you plan on creating multiple Gateways linking to the same
GatewayClass and would like different infrastructure configurations for each of them.

{{< tabpane text=true >}}
{{% tab header="Apply from stdin" %}}
Expand All @@ -28,7 +80,7 @@ spec:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
EOF
```

Expand All @@ -48,7 +100,7 @@ spec:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
```

{{% /tab %}}
Expand All @@ -67,7 +119,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand All @@ -87,7 +139,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -119,7 +171,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand All @@ -140,7 +192,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -168,7 +220,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand All @@ -191,7 +243,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -221,7 +273,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand All @@ -248,7 +300,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -280,7 +332,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand All @@ -305,7 +357,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -339,7 +391,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -368,7 +420,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -404,7 +456,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand All @@ -426,7 +478,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -459,7 +511,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
bootstrap:
type: Replace
Expand Down Expand Up @@ -547,7 +599,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
bootstrap:
type: Replace
Expand Down Expand Up @@ -649,7 +701,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -677,7 +729,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -713,7 +765,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
extraArgs:
- --disable-extensions envoy.access_loggers/envoy.access_loggers.wasm
Expand All @@ -730,7 +782,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
extraArgs:
- --disable-extensions envoy.access_loggers/envoy.access_loggers.wasm
Expand All @@ -756,7 +808,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: eg
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -792,7 +844,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: eg
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -835,7 +887,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: eg
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand All @@ -860,7 +912,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: eg
namespace: envoy-gateway-system
namespace: default
spec:
provider:
type: Kubernetes
Expand Down Expand Up @@ -918,7 +970,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
filterOrder:
- name: envoy.filters.http.wasm
Expand All @@ -938,7 +990,7 @@ apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: custom-proxy-config
namespace: envoy-gateway-system
namespace: default
spec:
filterOrder:
- name: envoy.filters.http.wasm
Expand Down
Loading

0 comments on commit 80d433e

Please sign in to comment.