Skip to content

Commit 8b4cf17

Browse files
authored
docs: fix extension-server instructions (#5013)
* docs: fix typos Signed-off-by: Dean Coakley <[email protected]> * docs: fix extension-server config instructions Signed-off-by: Dean Coakley <[email protected]> * docs: copy updates to v1.2 to satisfy gen-check Signed-off-by: Dean Coakley <[email protected]> * docs: undo removal of example docs fix Signed-off-by: Dean Coakley <[email protected]> * docs: fix missing space Signed-off-by: Dean Coakley <[email protected]> * docs: configmap file->configmap Signed-off-by: Dean Coakley <[email protected]> --------- Signed-off-by: Dean Coakley <[email protected]>
1 parent 70e8b66 commit 8b4cf17

File tree

5 files changed

+112
-70
lines changed

5 files changed

+112
-70
lines changed

site/content/en/contributions/design/extending-envoy-gateway.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ An example configuration:
5353
apiVersion: gateway.envoyproxy.io/v1alpha1
5454
kind: EnvoyGateway
5555
extensionManager:
56-
poliyResources:
56+
policyResources:
5757
- group: example.myextension.io
5858
version: v1alpha1
5959
kind: ListenerPolicyKind
@@ -69,7 +69,7 @@ extensionManager:
6969
- HTTPListener
7070
- Translation
7171
service:
72-
fqdn:
72+
fqdn:
7373
hostname: my-extension.example
7474
port: 443
7575
tls:
@@ -309,7 +309,7 @@ service EnvoyGatewayExtension {
309309
## Design Decisions
310310

311311
- Envoy Gateway watches new custom resources introduced by a loaded extension and passes the resources back to the extension when they are used.
312-
- This decision was made to solve the problem about how resources introduced by an extension get watched. If an extension server watches its own resources then it would need some way to trigger an Envoy Gateway reconfigure when a resource that Envoy Gateway is not watching gets updated. Having Envoy Gateway watch all resources removes any concern about creating race confitions or reconcile loops that would result from Envoy Gateway and the extension server both having so much separate state that needs to be synchronized.
312+
- This decision was made to solve the problem about how resources introduced by an extension get watched. If an extension server watches its own resources then it would need some way to trigger an Envoy Gateway reconfigure when a resource that Envoy Gateway is not watching gets updated. Having Envoy Gateway watch all resources removes any concern about creating race conditions or reconcile loops that would result from Envoy Gateway and the extension server both having so much separate state that needs to be synchronized.
313313
- The Extension Server takes ownership of producing the correct xDS configuration in the hook responses
314314
- The Extension Server will be responsible for ensuring the performance of the hook processing time
315315
- The Post xDS level gRPC hooks all currently send a context field even though it contains nothing for several hooks. These fields exist so that they can be updated in the future to pass

site/content/en/docs/tasks/extensibility/extension-server.md

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -99,29 +99,44 @@ image name and tag.
9999

100100
* Configure Envoy Gateway to use the Extension Server
101101

102-
Add the following fragment to Envoy Gateway's [configuration][] file:
103-
104-
```yaml
105-
extensionManager:
106-
# Envoy Gateway will watch these resource kinds and use them as extension policies
107-
# which can be attached to Gateway resources.
108-
policyResources:
109-
- group: example.extensions.io
110-
version: v1alpha1
111-
kind: ListenerContextExample
112-
hooks:
113-
# The type of hooks that should be invoked
114-
xdsTranslator:
115-
post:
116-
- HTTPListener
117-
service:
118-
# The service that is hosting the extension server
119-
fqdn:
120-
hostname: extension-server.envoy-gateway-system.svc.cluster.local
121-
port: 5005
102+
Add the following fragment to Envoy Gateway's configmap:
103+
104+
```shell
105+
cat <<EOF | kubectl apply -f -
106+
apiVersion: v1
107+
kind: ConfigMap
108+
metadata:
109+
name: envoy-gateway-config
110+
namespace: envoy-gateway-system
111+
data:
112+
envoy-gateway.yaml: |
113+
apiVersion: gateway.envoyproxy.io/v1alpha1
114+
kind: EnvoyGateway
115+
provider:
116+
type: Kubernetes
117+
gateway:
118+
controllerName: gateway.envoyproxy.io/gatewayclass-controller
119+
extensionManager:
120+
# Envoy Gateway will watch these resource kinds and use them as extension policies
121+
# which can be attached to Gateway resources.
122+
policyResources:
123+
- group: example.extensions.io
124+
version: v1alpha1
125+
kind: ListenerContextExample
126+
hooks:
127+
# The type of hooks that should be invoked
128+
xdsTranslator:
129+
post:
130+
- HTTPListener
131+
service:
132+
# The service that is hosting the extension server
133+
fqdn:
134+
hostname: extension-server.envoy-gateway-system.svc.cluster.local
135+
port: 5005
136+
EOF
122137
```
123138
124-
After updating Envoy Gateway's configuration file, restart Envoy Gateway.
139+
After updating Envoy Gateway's configmap, restart Envoy Gateway.
125140
126141
## Testing
127142
@@ -206,4 +221,3 @@ $ curl -v http://${GATEWAY_HOST}/example -H "Host: www.example.com" --user 'u
206221
[xDS]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/dynamic_configuration
207222
[design documentation]: /contributions/design/extending-envoy-gateway
208223
[SecurityPolicy]: /latest/api/extension_types/#securitypolicy
209-
[configuration]: /latest/api/extension_types/#extensionmanager

site/content/en/latest/tasks/extensibility/extension-server.md

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,44 @@ image name and tag.
107107

108108
* Configure Envoy Gateway to use the Extension Server
109109

110-
Add the following fragment to Envoy Gateway's [configuration][] file:
111-
112-
```yaml
113-
extensionManager:
114-
# Envoy Gateway will watch these resource kinds and use them as extension policies
115-
# which can be attached to Gateway resources.
116-
policyResources:
117-
- group: example.extensions.io
118-
version: v1alpha1
119-
kind: ListenerContextExample
120-
hooks:
121-
# The type of hooks that should be invoked
122-
xdsTranslator:
123-
post:
124-
- HTTPListener
125-
service:
126-
# The service that is hosting the extension server
127-
fqdn:
128-
hostname: extension-server.envoy-gateway-system.svc.cluster.local
129-
port: 5005
110+
Add the following fragment to Envoy Gateway's configmap:
111+
112+
```shell
113+
cat <<EOF | kubectl apply -f -
114+
apiVersion: v1
115+
kind: ConfigMap
116+
metadata:
117+
name: envoy-gateway-config
118+
namespace: envoy-gateway-system
119+
data:
120+
envoy-gateway.yaml: |
121+
apiVersion: gateway.envoyproxy.io/v1alpha1
122+
kind: EnvoyGateway
123+
provider:
124+
type: Kubernetes
125+
gateway:
126+
controllerName: gateway.envoyproxy.io/gatewayclass-controller
127+
extensionManager:
128+
# Envoy Gateway will watch these resource kinds and use them as extension policies
129+
# which can be attached to Gateway resources.
130+
policyResources:
131+
- group: example.extensions.io
132+
version: v1alpha1
133+
kind: ListenerContextExample
134+
hooks:
135+
# The type of hooks that should be invoked
136+
xdsTranslator:
137+
post:
138+
- HTTPListener
139+
service:
140+
# The service that is hosting the extension server
141+
fqdn:
142+
hostname: extension-server.envoy-gateway-system.svc.cluster.local
143+
port: 5005
144+
EOF
130145
```
131146
132-
After updating Envoy Gateway's configuration file, restart Envoy Gateway.
147+
After updating Envoy Gateway's configmap, restart Envoy Gateway.
133148
134149
## Testing
135150
@@ -214,4 +229,3 @@ $ curl -v http://${GATEWAY_HOST}/example -H "Host: www.example.com" --user 'u
214229
[xDS]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/dynamic_configuration
215230
[design documentation]: /contributions/design/extending-envoy-gateway
216231
[SecurityPolicy]: /latest/api/extension_types/#securitypolicy
217-
[configuration]: /latest/api/extension_types/#extensionmanager

site/content/en/v1.1/tasks/extensibility/extension-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ image name and tag.
117117
- HTTPListener
118118
service:
119119
# The service that is hosting the extension server
120-
fqdn:
120+
fqdn:
121121
hostname: extension-server.envoy-gateway-system.svc.cluster.local
122122
port: 5005
123123
```

site/content/en/v1.2/tasks/extensibility/extension-server.md

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -99,29 +99,44 @@ image name and tag.
9999

100100
* Configure Envoy Gateway to use the Extension Server
101101

102-
Add the following fragment to Envoy Gateway's [configuration][] file:
103-
104-
```yaml
105-
extensionManager:
106-
# Envoy Gateway will watch these resource kinds and use them as extension policies
107-
# which can be attached to Gateway resources.
108-
policyResources:
109-
- group: example.extensions.io
110-
version: v1alpha1
111-
kind: ListenerContextExample
112-
hooks:
113-
# The type of hooks that should be invoked
114-
xdsTranslator:
115-
post:
116-
- HTTPListener
117-
service:
118-
# The service that is hosting the extension server
119-
fqdn:
120-
hostname: extension-server.envoy-gateway-system.svc.cluster.local
121-
port: 5005
102+
Add the following fragment to Envoy Gateway's configmap:
103+
104+
```shell
105+
cat <<EOF | kubectl apply -f -
106+
apiVersion: v1
107+
kind: ConfigMap
108+
metadata:
109+
name: envoy-gateway-config
110+
namespace: envoy-gateway-system
111+
data:
112+
envoy-gateway.yaml: |
113+
apiVersion: gateway.envoyproxy.io/v1alpha1
114+
kind: EnvoyGateway
115+
provider:
116+
type: Kubernetes
117+
gateway:
118+
controllerName: gateway.envoyproxy.io/gatewayclass-controller
119+
extensionManager:
120+
# Envoy Gateway will watch these resource kinds and use them as extension policies
121+
# which can be attached to Gateway resources.
122+
policyResources:
123+
- group: example.extensions.io
124+
version: v1alpha1
125+
kind: ListenerContextExample
126+
hooks:
127+
# The type of hooks that should be invoked
128+
xdsTranslator:
129+
post:
130+
- HTTPListener
131+
service:
132+
# The service that is hosting the extension server
133+
fqdn:
134+
hostname: extension-server.envoy-gateway-system.svc.cluster.local
135+
port: 5005
136+
EOF
122137
```
123138
124-
After updating Envoy Gateway's configuration file, restart Envoy Gateway.
139+
After updating Envoy Gateway's configmap, restart Envoy Gateway.
125140
126141
## Testing
127142
@@ -206,4 +221,3 @@ $ curl -v http://${GATEWAY_HOST}/example -H "Host: www.example.com" --user 'u
206221
[xDS]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/dynamic_configuration
207222
[design documentation]: /contributions/design/extending-envoy-gateway
208223
[SecurityPolicy]: /latest/api/extension_types/#securitypolicy
209-
[configuration]: /latest/api/extension_types/#extensionmanager

0 commit comments

Comments
 (0)