Add HTTP/HTTPS toggle for etcd client connections (needed for k8s scalability tests!)#17878
Closed
dims wants to merge 1 commit intokubernetes:masterfrom
Closed
Add HTTP/HTTPS toggle for etcd client connections (needed for k8s scalability tests!)#17878dims wants to merge 1 commit intokubernetes:masterfrom
dims wants to merge 1 commit intokubernetes:masterfrom
Conversation
Member
Author
42c4f0a to
340bb72
Compare
This change allows cluster operators to toggle between HTTP and HTTPS
for etcd client connections on a per-cluster basis, matching the pattern
used by Kubernetes GCE scale tests where events etcd uses HTTP while main
etcd uses HTTPS.
Changes:
- Add ClientTLSEnabled field to EtcdClusterSpec (defaults to true)
- Add helper methods IsClientTLSEnabled() and GetClientScheme()
- Update etcd-manager model to use configurable scheme
- Update API server to use configurable scheme for etcd URLs
- Add validation to prevent disabling TLS on main etcd cluster
- Generate deepcopy and conversion functions
Benefits:
- Eliminates TLS handshake overhead for events etcd
- Fixes gRPC connection proliferation issues with TLS
- Allows HTTP for events (ephemeral data) while keeping main secure
- Enforces TLS for main etcd (contains cluster state)
Usage:
spec:
etcdClusters:
- name: main
# Uses HTTPS by default (secure)
- name: events
clientTLSEnabled: false # Use HTTP (fast)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
340bb72 to
839d153
Compare
olemarkus
approved these changes
Jan 28, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olemarkus The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
|
/hold |
Member
|
@dims would you mind switching the approach to feature flag instead of API. I would like to make it clear this is for experiments only, at least for now. |
Member
Author
|
@hakman of course. do you have a precedent flag i can use to follow? (i can file a fresh PR for sure) |
Member
Author
|
ok i see |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change allows cluster operators to toggle between HTTP and HTTPS for etcd client connections on a per-cluster basis, matching the pattern used by Kubernetes GCE scale tests where
eventsetcd uses HTTP whilemainetcd uses HTTPS.I'd like to match what is in: https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/configure-kubeapiserver.sh#L35
Changes:
Benefits: