feat(cloudflare): support custom hostname Origin SNI overrides#6211
feat(cloudflare): support custom hostname Origin SNI overrides#6211mrozentsvayg wants to merge 2 commits intokubernetes-sigs:masterfrom
Conversation
Adds <customHostname>=<customOriginSNI> annotation format for controlling the Origin SNI on Cloudflare custom hostnames. A trailing = sets SNI to the request Host header; omitting = defaults SNI to the origin server. Only sends custom_origin_sni to the API when explicitly overridden, since the field requires a Cloudflare account entitlement.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @mrozentsvayg. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
This PR is more about traffic routing than DNS management, so very high chances it may be out of scope. It would be worth double-checking with the owners on Slack to see what they think. |
|
Similar one #6085 |
What does it do ?
Extends the
cloudflare-custom-hostnameannotation to support Origin SNIoverrides using the format
<customHostname>=<customOriginSNI>.=suffix: SNI defaults to the origin server (existing behaviour, unchanged)=with no value: SNI is set to the request Host header=<value>: SNI is set to the specified hostnameThe
custom_origin_snifield is only sent to the Cloudflare API whenexplicitly overridden (i.e. when SNI differs from the origin server),
since the field requires a Cloudflare account entitlement.
Motivation
Cloudflare for SaaS supports routing custom hostname traffic to different
backends based on SNI. Without SNI control, all custom hostnames must share
the same TLS routing, which is too restrictive for multi-tenant setups where
different customers need traffic routed to different origins at the TLS layer.
For example, when using Envoy Gateway in Merged Gateways deployment mode,
each custom hostname needs its own SNI to correctly route TLS traffic to the
right backend — something that wasn't possible before without manual
Cloudflare configuration.
More