Altinity / Altinity/clickhouse-operator
Support configuring pod topologySpreadConstraints
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 574
- Avg merge
- 8d 6h
- Merged PRs (30d)
- 6
Description
Ability to configure topology constraints on clickhouse pods.
I want to prevent scheduling both replicas of a shard on the same node. Currently the operator supports this via shardAntiAffinity which sets an antiAffinity config on the pod.
However, I want to avoid using anti-affinity as listed in the k8 docs, usage of anti-affinity is not recommended in large clusters:
Inter-pod affinity and anti-affinity require substantial amounts of processing which can slow down scheduling in large clusters significantly. We do not recommend using them in clusters larger than several hundred nodes.
TopologySpreadConstraints could be used to achieve the same outcome, without the same limitations of slowing down k8 scheduling.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the existing shardAntiAffinity configuration and the operator's Kubernetes pod-generation path; the issue provides the example configuration and relevant Kubernetes documentation. Done means users can configure topologySpreadConstraints for ClickHouse pods and use them to avoid placing both shard replicas on one node without relying on anti-affinity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100