feat: add scheduling fields to EtcdCluster podTemplate.spec#398
Conversation
podTemplate.spec stops at affinity/nodeSelector/tolerations, so member pods cannot be spread across zones, given resource requests/limits, a priority class, or a non-default scheduler; with no resources set the etcd container makes every member pod BestEffort and first in line for node-pressure eviction. Add topologySpreadConstraints, resources (applied to the etcd container), priorityClassName and schedulerName to podTemplate.spec and propagate them into the StatefulSet pod template next to the existing scheduling fields. Regenerate deepcopy/CRD/api-docs. New tests assert every podTemplate scheduling field lands on the rendered StatefulSet. Signed-off-by: Xavier Lange <xrlange@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Xavier Lange <xrlange@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: xrl 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 @xrl. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. 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. |
spec.podTemplate.spec stops at affinity/nodeSelector/tolerations, so an EtcdCluster cannot spread members across zones/hosts, give the etcd container resource requests/limits (member pods are BestEffort today and first in line for node-pressure eviction), assign a priority class, or use a non-default scheduler. This adds topologySpreadConstraints, resources (applied to the etcd member container), priorityClassName and schedulerName — the same scheduling surface battle-tested database operators expose (CloudNativePG, Percona, Elastic ECK) — and propagates them into the StatefulSet pod template next to the existing scheduling fields. For topologySpreadConstraints the labelSelector should match the member pod labels (e.g.
app: <cluster-name>). Considered and rejected to keep this scheduling-scoped: runtimeClassName (runtime selection, not scheduling — its scheduling effect arrives via RuntimeClass pod-overhead admission), preemptionPolicy (already governed by the referenced PriorityClass), overhead (populated by the RuntimeClass admission controller, not users). Verified with make test and make verify; new tests assert every podTemplate scheduling field lands on the rendered StatefulSet, and deepcopy/CRD/api-docs are regenerated in the same commit.PR series — operability fixes & TLS
Small single-purpose PRs from live kind-cluster testing of the operator. Each stands alone unless an After is listed. → = this PR.
events.k8s.ioRBAC so operator Events are actually recordedmembers[]/leaderIDfrom one health snapshot (consistent leader)altNames.ipAddressesinto certificatesvalidityDuration(365d,100d12h) as documentedDegradedcondition (was empty status)--max-concurrent-reconciles)podTemplate.specscheduling fields: topologySpread, resources, priorityClass, schedulerNameconfig/surfacespec.tls.{peer,client}surfaces (breaking alpha API)TLSReadycondition + TLS lifecycle EventsPeerCANotSharedEtcdMirrorCRD: one-way cross-cluster replication API (types + CEL)pkg/mirroragentreplication engine (fenced checkpoint-in-target)mirror-agentbinary: config/TLS-reload/statusz/metrics + kind e2e/metricsendpointEtcdBackupCR → object storage (S3/GCS)🟢 ready · ⚪ draft