Skip to content

feat(cloudflare): support custom hostname Origin SNI overrides#6211

Open
mrozentsvayg wants to merge 2 commits intokubernetes-sigs:masterfrom
conduitxyz:mrozentsvayg/custom_origin_sni
Open

feat(cloudflare): support custom hostname Origin SNI overrides#6211
mrozentsvayg wants to merge 2 commits intokubernetes-sigs:masterfrom
conduitxyz:mrozentsvayg/custom_origin_sni

Conversation

@mrozentsvayg
Copy link
Contributor

@mrozentsvayg mrozentsvayg commented Feb 21, 2026

What does it do ?

Extends the cloudflare-custom-hostname annotation to support Origin SNI
overrides
using the format <customHostname>=<customOriginSNI>.

  • No = suffix: SNI defaults to the origin server (existing behaviour, unchanged)
  • Trailing = with no value: SNI is set to the request Host header
  • =<value>: SNI is set to the specified hostname

The custom_origin_sni field is only sent to the Cloudflare API when
explicitly 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

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

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.
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mloiseleur for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added provider Issues or PRs related to a provider registry Issues or PRs related to a registry needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 21, 2026
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 21, 2026
@ivankatliarchuk
Copy link
Member

ivankatliarchuk commented Feb 25, 2026

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.

@ivankatliarchuk
Copy link
Member

Similar one #6085

@AndrewCharlesHay
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. docs needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. provider Issues or PRs related to a provider registry Issues or PRs related to a registry size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants