Altinity / Altinity/clickhouse-operator

Unable to customize StatefulSet updateStrategy

Open
#1,773 5 comments 2 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

Hello,

We are using ClickHouse Operator version 0.25.0 and noticed that the StatefulSet update strategy is hardcoded to RollingUpdate, despite attempts to override it via the podTemplates spec:

podTemplates:
  - name: clickhouse-with-volume-template
    generateName: "chi-{cluster}-{host}"
    spec:
      updateStrategy:
        type: OnDelete

Our use case requires OnDelete to avoid pod reconcile triggered by minor config changes (e.g., max_concurrent_queries; when changed under spec > configuration > settings.

While configurationRestartPolicy works as expected to prevent ClickHouse restarts, the StatefulSet reconcile still leads to full pod termination and recreation due to the update strategy.

We confirmed in the code (stateful-set.go) that the updateStrategy is explicitly set to RollingUpdate, ignoring our podTemplates settings.

Image

Additional notes:
Operator logs show reconciles triggered by label/object version changes, causing pod recreation.

Request:

Support for customizing the StatefulSet updateStrategy (e.g., allowing OnDelete).

Thanks for your help!

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 at pkg/model/common/creator/stateful-set.go around line 57 and trace how podTemplates settings are handled when the StatefulSet is created. The work is done when a podTemplates updateStrategy such as OnDelete is honored instead of being overridden by RollingUpdate; the payload names no test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.