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

Keeper PVC is not taking input from VolumeClaimTemplates

Open zheyu001 opened this issue 1 year ago • 8 comments

We are trying to migrate our own keeper config to CHK, but it seems the PVC template is not taking into account. By quickly scan the code, it seems when creating CHK, it only cares about how many keeper volumes are declared instead of the content of the pvc? At least in our case, k8s complains about "both-paths" not found.

https://github.com/Altinity/clickhouse-operator/blob/0.23.3/pkg/model/chk/creator.go#L97-L118

zheyu001 avatar Mar 05 '24 03:03 zheyu001

I also encountered the same problem

Hope to specify PVC binding to the corresponding directory

dxygit1 avatar Mar 14 '24 01:03 dxygit1

Will be fixed in 0.23.4. There is a workaround in the current version, but better not to use it, it will be deprecated.

alex-zaitsev avatar Mar 14 '24 06:03 alex-zaitsev

Please let me know after you've fixed it. Thank you very much

dxygit1 avatar Mar 14 '24 06:03 dxygit1

Approximately when can this be fix

dxygit1 avatar Mar 18 '24 07:03 dxygit1

I run into the same issue. What do we need to do in the meantime to get things working? I just need to get CHK working with my CHI and I don't want to wait a few days or longer until a fix gets released. Ideally I get this working today with whatever workarounds are needed for now.

dustinmoris avatar Mar 23 '24 12:03 dustinmoris

+1 to the issue

genestack-okunitsyn avatar Mar 26 '24 18:03 genestack-okunitsyn

I got CHK working with this manifest:

apiVersion: "clickhouse-keeper.altinity.com/v1"
kind: "ClickHouseKeeperInstallation"
metadata:
  name: clickhouse-keeper
  namespace: plausible
spec:
  configuration:
    clusters:
      - name: prod
        layout:
          replicasCount: 3
    settings:
      logger/level: "trace"
      logger/console: "true"
      listen_host: "0.0.0.0"
      keeper_server/storage_path: /var/lib/clickhouse-keeper
      keeper_server/tcp_port: "2181"
      keeper_server/four_letter_word_white_list: "*"
      keeper_server/coordination_settings/raft_logs_level: "information"
      keeper_server/raft_configuration/server/port: "9444"
      prometheus/endpoint: "/metrics"
      prometheus/port: "7000"
      prometheus/metrics: "true"
      prometheus/events: "true"
      prometheus/asynchronous_metrics: "true"
      prometheus/status_info: "false"
  templates:
    podTemplates:
      - name: default
        spec:
          containers:
            - name: clickhouse-keeper
              image: "clickhouse/clickhouse-keeper:24-alpine"
              imagePullPolicy: IfNotPresent
              resources:
                requests:
                  memory: "256M"
                  cpu: "0.5"
                limits:
                  memory: "2Gi"
                  cpu: "2"
    volumeClaimTemplates:
      - name: both-paths
        spec:
          storageClassName: standard-rwo
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 10Gi

dustinmoris avatar Mar 26 '24 20:03 dustinmoris

https://github.com/Altinity/clickhouse-operator/issues/1362#issuecomment-2021453779 thanks ,this example is good

For original issue - probably we should have working & better example in https://github.com/Altinity/clickhouse-operator/tree/master/docs/chk-examples

jun0tpyrc avatar Jul 31 '24 09:07 jun0tpyrc