clickhouse-operator icon indicating copy to clipboard operation
clickhouse-operator copied to clipboard

Bug: Clickhouse operator doesnt render the correct template for CH-keeper statefulset on custom container name

Open iahmad-khan opened this issue 9 months ago • 1 comments

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.

iahmad-khan avatar Mar 26 '25 17:03 iahmad-khan

same issue here

OOub avatar Mar 28 '25 12:03 OOub