-
Notifications
You must be signed in to change notification settings - Fork 649
feat: support backend tls settings with envoyproxy #3218
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
Changes from all commits
9868422
7ecca6f
ccdae56
5ce2994
09f2f0e
01b3bcc
77fab65
69c25b8
93e8382
8022085
c6ed523
b9d6c8f
7755982
27a770f
6d98016
c17d15b
12f7063
949a5d7
5ed2666
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,7 +78,32 @@ func (t *Translator) processBackendTLSPolicy( | |
| } | ||
|
|
||
| status.SetAcceptedForPolicyAncestors(&policy.Status, ancestorRefs, t.GatewayControllerName) | ||
|
|
||
| // apply defaults as per envoyproxy | ||
| if resources.EnvoyProxy != nil { | ||
|
Contributor
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. Should we apply this logic outside of backendtlspolicy translation, since it's not directly originating from that policy? It's probably most efficient and user-friendly to do it here. But, in the future TLS settings may originate from other resources, as described in kubernetes-sigs/gateway-api#2910
Contributor
Author
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. Right, it can make sense but maybe we can do it after support for additional resources is implemented in upstream. I guess we can move / extend this logic to other areas as well at any time. Do you see an advantage in making this change now? Maybe If we want to support a use case of applying this on a gateway level already. wdyt? |
||
| if resources.EnvoyProxy.Spec.BackendTLS != nil { | ||
| if len(resources.EnvoyProxy.Spec.BackendTLS.Ciphers) > 0 { | ||
| tlsBundle.Ciphers = resources.EnvoyProxy.Spec.BackendTLS.Ciphers | ||
| } | ||
| if len(resources.EnvoyProxy.Spec.BackendTLS.ECDHCurves) > 0 { | ||
| tlsBundle.ECDHCurves = resources.EnvoyProxy.Spec.BackendTLS.ECDHCurves | ||
| } | ||
| if len(resources.EnvoyProxy.Spec.BackendTLS.SignatureAlgorithms) > 0 { | ||
| tlsBundle.SignatureAlgorithms = resources.EnvoyProxy.Spec.BackendTLS.SignatureAlgorithms | ||
| } | ||
| if resources.EnvoyProxy.Spec.BackendTLS.MinVersion != nil { | ||
| tlsBundle.MinVersion = ptr.To(ir.TLSVersion(*resources.EnvoyProxy.Spec.BackendTLS.MinVersion)) | ||
| } | ||
| if resources.EnvoyProxy.Spec.BackendTLS.MinVersion != nil { | ||
| tlsBundle.MaxVersion = ptr.To(ir.TLSVersion(*resources.EnvoyProxy.Spec.BackendTLS.MaxVersion)) | ||
| } | ||
| if len(resources.EnvoyProxy.Spec.BackendTLS.ALPNProtocols) > 0 { | ||
| tlsBundle.ALPNProtocols = make([]string, len(resources.EnvoyProxy.Spec.BackendTLS.ALPNProtocols)) | ||
| for i := range resources.EnvoyProxy.Spec.BackendTLS.ALPNProtocols { | ||
| tlsBundle.ALPNProtocols[i] = string(resources.EnvoyProxy.Spec.BackendTLS.ALPNProtocols[i]) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| return tlsBundle | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.