Altinity / Altinity/clickhouse-operator

Support configuring pod topologySpreadConstraints

Open
#1,717 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.