Skip to content

feat(helm): allow specifying operator image digest#146

Merged
GrigoryPervakov merged 2 commits intoClickHouse:mainfrom
jimrollenhagen:jroll/allow-image-digest
Apr 2, 2026
Merged

feat(helm): allow specifying operator image digest#146
GrigoryPervakov merged 2 commits intoClickHouse:mainfrom
jimrollenhagen:jroll/allow-image-digest

Conversation

@jimrollenhagen
Copy link
Copy Markdown
Contributor

Why

Users should be able to specify immutable image specs, which only digest allows (image tags are mutable).

What

Added a template helper to build the image spec, which uses digest if set, and tag if not, falling back to the existing default.

Tested this by using helm template to render old.yaml without my changes, and comparing it to various iterations of helm template with values specified.

clickhouse-operator > helm template clickhouse-operator dist/chart > new.yaml
clickhouse-operator > helm template clickhouse-operator --set "manager.image.tag=v0.0.2" dist/chart > with-tag-only.yaml
clickhouse-operator > helm template clickhouse-operator --set "manager.image.digest=sha256:abc123" dist/chart > with-digest-only.yaml
clickhouse-operator > helm template clickhouse-operator --set "manager.image.tag=v0.0.2" --set "manager.image.digest=sha256:abc123" dist/chart > with-both.yaml
clickhouse-operator > helm template clickhouse-operator --set "manager.image.repository=example.com/clickhouse-operator" --set "manager.image.digest=sha256:abc123" dist/chart > with-repo.yaml
clickhouse-operator > diff old.yaml new.yaml
clickhouse-operator > diff old.yaml with-tag-only.yaml
8826c8826
<                   image: "ghcr.io/clickhouse/clickhouse-operator:latest"
---
>                   image: "ghcr.io/clickhouse/clickhouse-operator:v0.0.2"
clickhouse-operator > diff old.yaml with-digest-only.yaml
8826c8826
<                   image: "ghcr.io/clickhouse/clickhouse-operator:latest"
---
>                   image: "ghcr.io/clickhouse/clickhouse-operator@sha256:abc123"
clickhouse-operator > diff old.yaml with-both.yaml
8826c8826
<                   image: "ghcr.io/clickhouse/clickhouse-operator:latest"
---
>                   image: "ghcr.io/clickhouse/clickhouse-operator@sha256:abc123"
clickhouse-operator > diff old.yaml with-repo.yaml
8826c8826
<                   image: "ghcr.io/clickhouse/clickhouse-operator:latest"
---
>                   image: "example.com/clickhouse-operator@sha256:abc123"

Related Issues

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 25, 2026

CLA assistant check
All committers have signed the CLA.

@GrigoryPervakov
Copy link
Copy Markdown
Member

Hi @jimrollenhagen, thank you for your contribution. Can you sign a CLA?

@jroll-stripe
Copy link
Copy Markdown

Hi @jimrollenhagen, thank you for your contribution. Can you sign a CLA?

Thanks for approving! I'm waiting on an ack from employer, but I will sign as soon as I get that and ping you :)

@GrigoryPervakov GrigoryPervakov force-pushed the jroll/allow-image-digest branch from d697944 to 3792cb8 Compare March 31, 2026 14:49
@GrigoryPervakov GrigoryPervakov changed the title allow specifying operator image digest feat(helm): allow specifying operator image digest Mar 31, 2026
@GrigoryPervakov GrigoryPervakov self-assigned this Mar 31, 2026
@GrigoryPervakov GrigoryPervakov force-pushed the jroll/allow-image-digest branch from c24ce2a to 401e2c2 Compare April 1, 2026 10:48
@jimrollenhagen
Copy link
Copy Markdown
Contributor Author

@GrigoryPervakov it's signed now, sorry for the wait!

@GrigoryPervakov GrigoryPervakov enabled auto-merge (squash) April 2, 2026 11:42
@GrigoryPervakov GrigoryPervakov merged commit 34efe55 into ClickHouse:main Apr 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants