Altinity / Altinity/clickhouse-operator
Bug: Clickhouse operator doesnt render the correct template for CH-keeper statefulset on custom container name
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 574
- Avg merge
- 8d 6h
- Merged PRs (30d)
- 6
Description
Operator version: 0.24.5
Keeper def deployed via the keeper installation CRD with this issue
apiVersion: "clickhouse-keeper.altinity.com/v1"
kind: "ClickHouseKeeperInstallation"
metadata:
name: ch-keeper
spec:
configuration:
clusters:
- name: "ch-keeper"
layout:
replicasCount: 3
settings:
logger/level: "trace"
logger/console: "true"
listen_host: "0.0.0.0"
keeper_server/four_letter_word_white_list: "*"
keeper_server/coordination_settings/raft_logs_level: "information"
prometheus/endpoint: "/metrics"
prometheus/port: "7000"
prometheus/metrics: "true"
prometheus/events: "true"
prometheus/asynchronous_metrics: "true"
prometheus/status_info: "true"
defaults:
templates:
podTemplate: ch-keeper
dataVolumeClaimTemplate: data-volume
templates:
podTemplates:
- name: ch-keeper
metadata:
labels:
app: ch-keeper
spec:
nodeSelector:
tenantname: analytics
containers:
- name: ch-keeper
imagePullPolicy: IfNotPresent
image: "clickhouse/clickhouse-keeper:24.9.1-alpine"
resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "512Mi"
cpu: "500m"
securityContext:
fsGroup: 101
volumeClaimTemplates:
- name: data-volume
spec:
storageClassName: "gp3"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
Issue:
While defining the operator, if we provide a custom name to the container, the deployed stateful creates two containers, one with the default name clickhouse-operator and the other with the custom name ( i.e, ch-operator ) provided in the CRD definition.
Expected Behavior:
The Keeper statefulset should be running a single container inside the pod with the new name provided in the installation CRD resource as above.
This issue is reproducible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the ClickHouseKeeperInstallation CRD and inspect the generated Keeper StatefulSet, focusing on how the pod template's custom container name is merged with the default container. Done means the StatefulSet contains one container using the custom name, without the default duplicate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100