Skip to content

Restart Property in ClickHouseInstallation spec not cleared after restart is completed #1790

@evangeline013

Description

@evangeline013

Environment:
Operator version: altinity/clickhouse-operator:0.24.5
ClickHouse version: 23.12.5.81

Issue:
When performing a rolling restart of ClickHouse via the operator by patching the restart property in the ClickHouseInstallation spec with the following command:

kubectl patch chi ch -n clickhouse --type=merge -p '{"spec":{"restart":"RollingUpdate"}}'

the restart works correctly the first time. However, the restart property remains in the spec after the restart completes, even though the documentation mentioned that the property is ephemeral and should be removed by the operator once the restart is complete.

Due to the Restart property not being removed, the same command will not trigger a restart since there's no change:

clickhouseinstallation.clickhouse.altinity.com/ch patched (no change)

I posted this in the slack help channel and Robert suggested that this behavior is not expected, so logging the issue here wondering if you guys can take a look

Also, would it be a safe workaround if we manually reset the field to an empty string before re-running the patch command like this?

kubectl patch chi ch -n clickhouse --type=merge -p '{"spec":{"restart":""}}'
kubectl patch chi ch -n clickhouse --type=merge -p '{"spec":{"restart":"RollingUpdate"}}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions