-
Notifications
You must be signed in to change notification settings - Fork 333
Add support for envoy gateway #5150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
smatting
wants to merge
64
commits into
develop
Choose a base branch
from
WPB-23903-routes-1
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
f3a0ef5
wip
smatting eb734a9
checkboxes
smatting 34b0a2e
mention nginx-ingress-services in the backwards compatbility section
smatting 3dcd29f
scaffolding + helpers
smatting 98f715b
modify .envrc for development
smatting 0201e4e
update plan
smatting 6bb3be0
phase 2-3
smatting 5c8b760
Allow for externally created secret
smatting a7354e0
nginz routes
smatting 6c73756
more routes
smatting 19705d0
Adjust plan: routes together with services
smatting 8c92a84
team settings and account pages
smatting 8f930bb
fake-s3 route
smatting dcdb0d0
complete federator phase
smatting 4d7a772
use different secret name for federators certificate
smatting aea6297
udpate plan notes for federation helper
smatting 7366934
wip integrations tests
smatting 3f5ba90
Add post-upgrade hook to all tests
smatting 64743f1
use type: ClusterIP on gateway instead of LoadBlancer, use port 10443
smatting 0ce80c1
make mtls client cert validation optional at the ingress level
smatting 7c751ed
add todo
smatting 7d4de25
support sharing envoyproxy objects
smatting 730b55c
remove skipPriviledgedPortCheck
smatting d0169cb
integration chart: remove ingress (and service targeting ingress)
smatting 779b88e
complete todo
smatting 7261a9b
drop customSolversSecrets
smatting 2ebd7db
update README
smatting d005795
add TODO
smatting f83f957
integration tests: fix originDomains
smatting c705f7a
add go.sh
smatting 9948132
force explicit hostnames in gateway listeners
smatting 4e5cc08
fix trailing dot problem of integration tests.
smatting 2968d59
remove unused ExternalName service from previous attempts
smatting 8551c60
Revert "integration chart: remove ingress (and service targeting ingr…
smatting 2c688b6
wip integration envoy
smatting 22eaab1
fix (workaround): [emerg] 850#850: too long path in the unix domain …
smatting 015789f
wip
smatting 23327b2
use new build in go.sh
smatting 151e59d
run all tests
smatting 8979fbf
add TODOs
smatting ca69188
make ingress mode configurable for integration tests
smatting a184d2a
replace envoy-gateway-system hardcoded name with var
smatting 7b2bff9
envoy patch policies
smatting 24cc3f9
rename federation-test-helper.yaml to service-test-fed.yaml
smatting 60ce5af
update parameter documentation
smatting 6163c60
use a different patch policy to support the FQDMs
smatting 52b18e4
test envoy by default
smatting b7c1bfa
follow-up to patch policies: make configurable
smatting 46b5ea4
update envoypatchpolicy section
smatting c5999d8
wip migration guide
smatting 57a4159
polish a bit
smatting e3df974
move planning out of readme
smatting 26ddbde
small corrections
smatting 1bed378
revert to normal
smatting b0313a0
remove unused file
smatting 6518213
revert file
smatting d293c8e
update comment
smatting 24b354b
rename file ingress-envoy.aml to envoy-gateway.yaml
smatting 4e4e758
add missing backentrafficpolicy to support websockets
smatting 83b86e7
remove CLAUDE.md
smatting aec2051
moved todo to ticket
smatting 7f2173d
prevent any untested changes to the nginx-ingress-services chart
smatting 3cc3c42
remove PLAN.md
smatting f8ead45
add changelog entry
smatting File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| New `wire-ingress` Helm chart — Gateway API / Envoy Gateway replacement for `nginx-ingress-services`. Not yet production-ready. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| {{- if .Values.envoy.enabled }} | ||
| {{- $gatewayName := include "integration.getDynBackendsGatewayName" . }} | ||
| {{- $httpsPort := int .Values.envoy.gateway.listeners.https.port }} | ||
| {{- $controllerNs := .Values.envoy.controllerNamespace }} | ||
| {{- if lt $httpsPort 1024 }} | ||
| {{- fail (printf "envoy.gateway.listeners.https.port is %d (privileged, <1024). Envoy Gateway remaps it to %d on the proxy pod. Set envoy.gateway.listeners.https.port to the actual container port (e.g. %d)." $httpsPort (add $httpsPort 10000) (add $httpsPort 10000)) }} | ||
| {{- end }} | ||
| --- | ||
| # EnvoyProxy configures the proxy deployment/service for the dynamic-backends Gateway. | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: EnvoyProxy | ||
| metadata: | ||
| name: {{ $gatewayName }} | ||
| spec: | ||
| provider: | ||
| type: Kubernetes | ||
| kubernetes: | ||
| envoyService: | ||
| # ClusterIP: no external load balancer needed for in-cluster integration tests. | ||
| type: ClusterIP | ||
| --- | ||
| # Gateway for all dynamic backends. A single HTTPS listener covers all backend hostnames. | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| name: {{ $gatewayName }} | ||
| spec: | ||
| gatewayClassName: {{ required "envoy.gateway.className is required when envoy.enabled is true" .Values.envoy.gateway.className | quote }} | ||
| infrastructure: | ||
| parametersRef: | ||
| group: gateway.envoyproxy.io | ||
| kind: EnvoyProxy | ||
| name: {{ $gatewayName | quote }} | ||
| listeners: | ||
| - name: https | ||
| port: {{ $httpsPort }} | ||
| protocol: HTTPS | ||
| tls: | ||
| mode: Terminate | ||
| certificateRefs: | ||
| - name: {{ .Values.envoy.federator.tls.secretName | quote }} | ||
| kind: Secret | ||
| --- | ||
| # ClientTrafficPolicy enforces optional mTLS client cert validation on all dynamic-backend | ||
| # connections (mirrors the nginx auth-tls-verify-client: "on" annotation). | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: ClientTrafficPolicy | ||
| metadata: | ||
| name: {{ $gatewayName }}-mtls | ||
| spec: | ||
| targetRefs: | ||
| - group: gateway.networking.k8s.io | ||
| kind: Gateway | ||
| name: {{ $gatewayName | quote }} | ||
| sectionName: https | ||
| tls: | ||
| clientValidation: | ||
| optional: true | ||
| caCertificateRefs: | ||
| - name: federator-ca | ||
| kind: ConfigMap | ||
| --- | ||
| # EnvoyPatchPolicy strips the trailing dot that Kubernetes DNS appends to FQDNs. | ||
| # Wire federator resolves targets via SRV and sends the raw FQDN (with trailing dot) | ||
| # as the HTTP/2 :authority header; strip_trailing_host_dot normalises it before | ||
| # Envoy's virtual-host matching, preventing route_not_found errors. | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: EnvoyPatchPolicy | ||
| metadata: | ||
| name: {{ $gatewayName }}-strip-dot | ||
| spec: | ||
| targetRef: | ||
| group: gateway.networking.k8s.io | ||
| kind: Gateway | ||
| name: {{ $gatewayName | quote }} | ||
| type: JSONPatch | ||
| jsonPatches: | ||
| - type: "type.googleapis.com/envoy.config.listener.v3.Listener" | ||
| # Single HTTPS listener → only one filter chain at index 0. | ||
| name: {{ printf "%s/%s/https" .Release.Namespace $gatewayName | quote }} | ||
| operation: | ||
| op: add | ||
| path: "/filter_chains/0/filters/0/typed_config/strip_trailing_host_dot" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't you use the same approach las in charts/wire-ingress/templates/envoypatchpolicy-federator.yaml:36-41 |
||
| value: true | ||
| {{- range $name, $dynamicBackend := .Values.config.dynamicBackends }} | ||
| {{- $httpRouteName := printf "%s-dynbackend-%s" $gatewayName $name }} | ||
| {{- $svcDomain := printf "%s-%s.%s.svc.cluster.local" $dynamicBackend.federatorExternalHostPrefix $.Release.Namespace $controllerNs }} | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: {{ $httpRouteName }} | ||
| spec: | ||
| parentRefs: | ||
| - name: {{ $gatewayName | quote }} | ||
| namespace: {{ $.Release.Namespace | quote }} | ||
| kind: Gateway | ||
| sectionName: https | ||
| hostnames: | ||
| - {{ $svcDomain | quote }} | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: / | ||
| backendRefs: | ||
| - name: integration | ||
| port: {{ $dynamicBackend.federatorExternalPort }} | ||
| kind: Service | ||
| --- | ||
| # EnvoyExtensionPolicy injects the mTLS client certificate as X-SSL-Certificate request | ||
| # header, matching the nginx $ssl_client_escaped_cert behaviour expected by federator. | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: EnvoyExtensionPolicy | ||
| metadata: | ||
| name: {{ $httpRouteName }}-cert-header | ||
| spec: | ||
| targetRefs: | ||
| - group: gateway.networking.k8s.io | ||
| kind: HTTPRoute | ||
| name: {{ $httpRouteName }} | ||
| lua: | ||
| - type: Inline | ||
| inline: | | ||
| function envoy_on_request(request_handle) | ||
| local ssl = request_handle:connection():ssl() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same headers():add issue |
||
| if ssl ~= nil then | ||
| local cert = ssl:urlEncodedPemEncodedPeerCertificate() | ||
| if cert ~= nil and cert ~= "" then | ||
| request_handle:headers():add("X-SSL-Certificate", cert) | ||
| end | ||
| end | ||
| end | ||
| --- | ||
| # ClusterIP service in {{ $controllerNs }} selects the Envoy proxy pods for this Gateway. | ||
| # The service name determines the SRV record used by federation discovery: | ||
| # _wire-server-federator._tcp.{{ $svcDomain }} | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ $dynamicBackend.federatorExternalHostPrefix }}-{{ $.Release.Namespace }} | ||
| namespace: {{ $controllerNs }} | ||
| spec: | ||
| type: ClusterIP | ||
| ports: | ||
| - name: wire-server-federator | ||
| port: 443 | ||
| protocol: TCP | ||
| targetPort: {{ $httpsPort }} | ||
| selector: | ||
| gateway.envoyproxy.io/owning-gateway-name: {{ $gatewayName }} | ||
| gateway.envoyproxy.io/owning-gateway-namespace: {{ $.Release.Namespace }} | ||
| {{- end }} | ||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the five kinds here carry chart/release label