Skip to content

Commit

Permalink
docs: document patches in envoy proxy (envoyproxy#3027)
Browse files Browse the repository at this point in the history
* docs: document patches in envoy proxy

Signed-off-by: Yael Shechter <[email protected]>

* fix linting issue

Signed-off-by: Yael Shechter <[email protected]>

* fix pr comment

Signed-off-by: Yael Shechter <[email protected]>

---------

Signed-off-by: Yael Shechter <[email protected]>
  • Loading branch information
yaelSchechter authored and zhaohuabing committed Mar 27, 2024
1 parent 1966817 commit 5372dbe
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions site/content/en/latest/user/operations/customize-envoyproxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,47 @@ spec:
EOF
```

## Customize EnvoyProxy with Patches

You can customize the EnvoyProxy using patches.

For example, the following configuration will add resource limits to the `envoy` and the `shutdown-manager` containers in the `envoyproxy` deployment:

```shell
cat <<EOF | kubectl apply -f -
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: eg
namespace: envoy-gateway-system
spec:
provider:
type: Kubernetes
kubernetes:
envoyDeployment:
patch:
type: StrategicMerge
value:
spec:
template:
spec:
containers:
- name: envoy
resources:
limits:
cpu: 500m
memory: 1024Mi
- name: shutdown-manager
resources:
limits:
cpu: 200m
memory: 1024Mi
EOF
```

After applying the configuration, you will see the change in both containers in the `envoyproxy` deployment.

[Gateway API documentation]: https://gateway-api.sigs.k8s.io/
[EnvoyProxy]: ../../../api/extension_types#envoyproxy
[egctl translate]: ../egctl/#validating-gateway-api-configuration

0 comments on commit 5372dbe

Please sign in to comment.