Skip to content

clean(deployment): remove deprecated OnePerHost pod-distribution value - #2083

Merged
alex-zaitsev merged 5 commits into
Altinity:0.28.0from
Tyagiquamar:fix/remove-deprecated-one-per-host
Oct 16, 2026
Merged

alex-zaitsev merged 5 commits into
Altinity:0.28.0from
Tyagiquamar:fix/remove-deprecated-one-per-host

Conversation

@Tyagiquamar

Copy link
Copy Markdown

Description

This pull request removes the deprecated and inactive OnePerHost pod distribution value across the codebase, CRDs, templates, test requirements, and documentation as requested in #1978.

OnePerHost was deprecated dead code in pkg/apis/deployment/affinity.go: no normalizer or affinity builder handled it, and user-supplied OnePerHost values silently resolved to Unspecified without generating anti-affinity rules.

Key changes:

  1. Removed PodDistributionOnePerHost constant and its entry from podDistributionTypes slice in pkg/apis/deployment/affinity.go.
  2. Added normalization test coverage in pkg/apis/deployment/affinity_test.go verifying that OnePerHost passes through uncanonicalized as unrecognized.
  3. Removed OnePerHost from CRD enums across deploy/operator/parts/crd.yaml, deploy/builder/templates-install-bundle/, and deploy/helm/clickhouse-operator/crds/.
  4. Updated example templates and documentation (docs/custom_resource_explained.md, docs/chit-examples/104-templates.yaml, config/chi/templates.d/, deploy/helm/clickhouse-operator/values.yaml) to use standard podDistribution with ClickHouseAntiAffinity.
  5. Updated requirement specs in tests/requirements/requirements.md and tests/requirements/requirements.py.

Verification

Ran unit tests inside Docker (golang:1.26-bookworm):

go test -v ./pkg/apis/deployment/...

Output:

=== RUN   TestNormalizePodDistributionType
--- PASS: TestNormalizePodDistributionType (0.00s)
=== RUN   TestNormalizePodDistributionScope
--- PASS: TestNormalizePodDistributionScope (0.00s)
=== RUN   TestNormalizePortDistributionType
--- PASS: TestNormalizePortDistributionType (0.00s)
PASS
ok  	github.com/altinity/clickhouse-operator/pkg/apis/deployment	0.017s

Fixes #1978.

@sunsingerus sunsingerus added the planned for review This feature is planned for review label Sep 22, 2026
@sunsingerus sunsingerus self-assigned this Sep 22, 2026
@Tyagiquamar

Copy link
Copy Markdown
Author

Hi team, following up to check if anyone has time to review this PR when convenient. Thanks!

@alex-zaitsev
alex-zaitsev changed the base branch from master to 0.28.0 October 15, 2026 16:07
@alex-zaitsev
alex-zaitsev self-requested a review October 16, 2026 10:08
@alex-zaitsev
alex-zaitsev merged commit a41fb9f into Altinity:0.28.0 Oct 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

planned for review This feature is planned for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove deprecated OnePerHost pod-distribution value

3 participants