Skip to content

Commit 9761e4e

Browse files
authored
Merge pull request #187 from datum-cloud/docs/envoy-gateway-extension-server
Enhancement proposal: Envoy Gateway extension server
2 parents 0e0fbc8 + f0fd9dc commit 9761e4e

7 files changed

Lines changed: 1009 additions & 0 deletions

File tree

docs/enhancements/envoy-gateway-extension-server/README.md

Lines changed: 876 additions & 0 deletions
Large diffs are not rendered by default.
124 KB
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@startuml c4-container
2+
!$NEW_C4_STYLE = 1
3+
!include <C4/C4_Container>
4+
!include /Users/scotwells/repos/datum-cloud/enhancements/enhancements/datum-theme.puml
5+
6+
LAYOUT_LEFT_RIGHT()
7+
8+
Person_Ext(customer, "Customer", "Creates Gateways and routing\nrules to expose workloads;\nsends traffic to exposed services")
9+
System_Ext(backend, "Customer's Private\nBackend", "A service running on the\ncustomer's own network;\nnot directly exposed to\nthe internet")
10+
11+
System_Boundary(datum, "Datum Network Services") {
12+
13+
Boundary(cp, "Control Plane") {
14+
Container(nso, "Network Services\nOperator", "Kubernetes Operator", "Watches Gateway and routing\nresources; manages the lifecycle\nof network policy objects")
15+
16+
Container_Ext(eg, "Envoy Gateway", "Configuration Builder", "Translates Gateway and routing\nresources into proxy configuration;\ncalls the Extension Server\nduring every configuration build")
17+
18+
Container(ext, "Extension Server", "Configuration Plugin [NEW]", "Plugs into Envoy Gateway's\nbuild pipeline; injects WAF\nprotection and connector routing\ndirectly during the build")
19+
20+
Container_Ext(certmgr, "cert-manager", "Certificate Manager", "Automatically issues and renews\nTLS certificates (e.g. via\nLet's Encrypt) for customer domains")
21+
}
22+
23+
Boundary(dp, "Data Plane") {
24+
Container(envoy, "Envoy Proxy", "Traffic Handler", "Receives and forwards all\ncustomer HTTP/HTTPS traffic;\nenforces WAF rules and\nhandles connector routing")
25+
}
26+
}
27+
28+
Rel_R(customer, nso, "Creates Gateways\nand routing rules", "Kubernetes API")
29+
Rel_R(customer, envoy, "Sends HTTP/HTTPS\nrequests", "HTTPS")
30+
31+
Rel_L(nso, eg, "Publishes Gateway\nand policy resources", "Kubernetes API")
32+
Rel(eg, ext, "Calls extension hook\nduring config build", "gRPC")
33+
Rel(eg, envoy, "Pushes complete\nproxy configuration", "gRPC")
34+
Rel_U(certmgr, envoy, "Delivers TLS\ncertificates", "Kubernetes Secret")
35+
Rel_U(envoy, backend, "Forwards traffic through\nconnector tunnel", "TCP")
36+
37+
SHOW_LEGEND()
38+
@enduml
39.4 KB
Loading
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
@startuml seq-current-flow
2+
!include /Users/scotwells/repos/datum-cloud/enhancements/enhancements/datum-theme-sequence.puml
3+
4+
title Configuration Flow — Current Approach (EnvoyPatchPolicy)
5+
6+
participant "Customer" as C <<Person>>
7+
participant "Network Services\nOperator" as NSO
8+
participant "Envoy Gateway\n(Control Plane)" as EG
9+
participant "Envoy Proxy\n(Data Plane)" as EP
10+
11+
== Customer changes a Gateway or route ==
12+
13+
C -> NSO : Create or update a\nGateway / HTTPRoute
14+
15+
NSO -> EG : Create WAF EnvoyPatchPolicy\n(one per gateway with WAF)
16+
NSO -> EG : Create Connector EnvoyPatchPolicy\n(one per gateway with Connector)
17+
18+
note right of NSO
19+
At 140 gateways, this produces
20+
hundreds of patch objects that
21+
must all be re-applied on every
22+
single rebuild.
23+
end note
24+
25+
== Envoy Gateway rebuilds and patches ==
26+
27+
EG -> EG : Rebuild the ENTIRE shared\nconfiguration (all gateways)
28+
29+
loop For every EnvoyPatchPolicy across all gateways
30+
EG -> EG : Apply patch to\nconfiguration
31+
end
32+
33+
note right of EG
34+
Rebuild time scales with the
35+
total number of gateways —
36+
not the number of changed ones.
37+
At ~140 gateways: >1 minute.
38+
end note
39+
40+
EG -> EP : Push patched configuration
41+
42+
note right of EP
43+
If a TLS certificate challenge
44+
was pending, it may have already
45+
expired during the rebuild.
46+
end note
47+
48+
EP --> C : Serve traffic (with WAF\nand Connector active)
49+
50+
@enduml
38.7 KB
Loading
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
@startuml seq-proposed-flow
2+
!include /Users/scotwells/repos/datum-cloud/enhancements/enhancements/datum-theme-sequence.puml
3+
4+
title Configuration Flow — Proposed Approach (Extension Server)
5+
6+
participant "Customer" as C <<Person>>
7+
participant "Network Services\nOperator" as NSO
8+
participant "Envoy Gateway\n(Control Plane)" as EG
9+
participant "Extension Server\n[NEW]" as EXT
10+
participant "Envoy Proxy\n(Data Plane)" as EP
11+
12+
== Customer changes a Gateway or route ==
13+
14+
C -> NSO : Create or update a\nGateway / HTTPRoute
15+
16+
NSO -> EG : Create or update Gateway\nand policy resources\n(no patch objects needed)
17+
18+
== Envoy Gateway builds configuration ==
19+
20+
EG -> EG : Build configuration for\nthe changed gateway
21+
22+
EG -> EXT : Call extension hook —\n"here is the configuration\nin progress"
23+
24+
note right of EXT
25+
Called ONCE per build,
26+
regardless of how many
27+
gateways exist.
28+
end note
29+
30+
EXT -> EXT : Read WAF and Connector\npolicies for this gateway
31+
32+
EXT -> EG : Return modified configuration —\nWAF filter and Connector\nroutes already injected
33+
34+
EG -> EP : Push complete,\nready-to-use configuration
35+
36+
note right of EG
37+
Build completes in seconds,
38+
not minutes. TLS certificate
39+
challenges can be served
40+
before they expire.
41+
end note
42+
43+
EP --> C : Serve traffic (with WAF\nand Connector active)
44+
45+
@enduml

0 commit comments

Comments
 (0)