Skip to content

feat: Add optional leases etcd shard#18054

Merged
k8s-ci-robot merged 6 commits into
kubernetes:masterfrom
apeabody:ap/leases
Apr 9, 2026
Merged

feat: Add optional leases etcd shard#18054
k8s-ci-robot merged 6 commits into
kubernetes:masterfrom
apeabody:ap/leases

Conversation

@apeabody
Copy link
Copy Markdown
Contributor

@apeabody apeabody commented Mar 12, 2026

Adds support for configuring an optional leases etcd shard. This shard is specifically designed for megaclusters to isolate the massive volume of high-frequency write traffic generated by node heartbeats. By redirecting this traffic to a dedicated leases shard, it prevents the primary etcd database from being overwhelmed, ensuring overall control plane stability.

  • Allows 'leases' API validation
  • Maps well-known port assignments
  • Configures API Server overrides and nodeup DNS mapping
  • Updates Etcd Manager and TLS Configurations
  • Implements Node diagnostics, E2E integrations, and log overrides
  • Introduces mock test fixtures in cluster.go

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @apeabody. Thanks for your PR.

I'm waiting for a kubernetes 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.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

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 the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 12, 2026
@k8s-ci-robot k8s-ci-robot requested a review from johngmyers March 12, 2026 02:44
@k8s-ci-robot k8s-ci-robot requested a review from olemarkus March 12, 2026 02:44
@k8s-ci-robot k8s-ci-robot added area/nodeup area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/openstack Issues or PRs related to openstack provider labels Mar 12, 2026
- Allows 'leases' API validation
- Maps well-known port assignments
- Configures API Server overrides and nodeup DNS mapping
- Updates Etcd Manager and TLS Configurations
- Implements Node diagnostics, E2E integrations, and log overrides
- Introduces mock test fixtures in cluster.go
@hakman
Copy link
Copy Markdown
Member

hakman commented Mar 13, 2026

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 13, 2026
@hakman
Copy link
Copy Markdown
Member

hakman commented Mar 13, 2026

@apeabody Could you add some info in the description on why this is useful and who should use it?

Add documentation about the optional leases etcd shard for megaclusters, including an example configuration.
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 13, 2026
@apeabody
Copy link
Copy Markdown
Contributor Author

@apeabody Could you add some info in the description on why this is useful and who should use it?

Thanks @hakman - Also added to the create cluster documentation.

Copy link
Copy Markdown
Member

@rifelpet rifelpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there value in giving this etcd cluster persistent remote storage like EBS volumes? @hakman I'm wondering if we could just give it a hostPath volume mount instead.

Comment thread pkg/model/components/apiserver.go Outdated
Comment thread nodeup/pkg/model/kube_apiserver.go Outdated
fi

CREATE_ARGS="--networking cilium --set=cluster.spec.networking.cilium.hubble.enabled=true --set=cluster.spec.certManager.enabled=true"
CREATE_ARGS="--networking cilium --set=cluster.spec.networking.cilium.hubble.enabled=true --set=cluster.spec.certManager.enabled=true --etcd-clusters main,events,cilium,leases"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apeabody Please revert this change, this is a deprecated test and will be removed soon. It might be a good idea to add a presubmit test and try it though. See kubernetes/test-infra#36750 as example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment thread pkg/model/components/apiserver.go Outdated
apeabody and others added 2 commits April 8, 2026 20:42
Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
@hakman hakman changed the title Feature: Add optional 'leases' etcd shard feaat: Add optional leases etcd shard Apr 9, 2026
Copy link
Copy Markdown
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🚀

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 9, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2026
@k8s-ci-robot k8s-ci-robot merged commit 355c0e3 into kubernetes:master Apr 9, 2026
26 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.36 milestone Apr 9, 2026
@apeabody apeabody deleted the ap/leases branch April 9, 2026 15:52
@apeabody apeabody changed the title feaat: Add optional leases etcd shard feat: Add optional leases etcd shard Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api area/documentation area/nodeup area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/openstack Issues or PRs related to openstack provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants