Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickhouse instance node selector #326

Open
sarsony1 opened this issue Nov 8, 2023 · 3 comments
Open

Clickhouse instance node selector #326

sarsony1 opened this issue Nov 8, 2023 · 3 comments
Assignees
Labels
chart:clickhouse Issue related to clickhouse helm chart question Further information is requested

Comments

@sarsony1
Copy link

sarsony1 commented Nov 8, 2023

When I set custom node selector, for clickhouse instance, they are not being passed to the chi pods that are generated. But its working fine when it comes to clickhouse operator

Please look and it and let me know if I am missing something

Here is my config

clickhouse: 
    installCustomStorageClass: true
    nodeSelector:
      component: stateful
    tolerations:
      - effect: NoSchedule
        key: component
        operator: Equal
        value: stateful
    persistence:
      size: 15Gi
    resources:
      requests:
        cpu: 1000m
        memory: 1000Mi
        limits:
          cpu: 2000m
          memory: 4Gi
    settings:
      prometheus/endpoint: /metrics
      prometheus/port: 9363
      prometheus/metrics: true
      prometheus/events: true
      prometheus/asynchronous_metrics: true
    
    zookeeper:
      nodeSelector:
        component: stateful
      tolerations:
        - effect: NoSchedule
          key: component
          operator: Equal
          value: stateful

    clickhouseOperator:
      nodeSelector:
        component: stateful
      tolerations:
        - effect: NoSchedule
          key: component
          operator: Equal
          value: stateful
@prashant-shahi
Copy link
Member

prashant-shahi commented Nov 8, 2023

@sarsony1 Looks like the ClickHouse Installation is not passing the node selector to the CHI pods.
Let me look into this.

Meanwhile, can you use the affinity and podDistribution (in case of multiple shards) instead?

clickhouse:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: component
            operator: In
            values:
            - stateful
    podDistribution:
      - type: ReplicaAntiAffinity
        topologyKey: kubernetes.io/hostname
      - type: MaxNumberPerNode
        maxNumber: 1
        topologyKey: kubernetes.io/hostname

@prashant-shahi prashant-shahi self-assigned this Nov 8, 2023
@sarsony1
Copy link
Author

sarsony1 commented Nov 8, 2023

Even nodeAffinity is not being passed to the pods. I can see that in the ClickhouseInstance resource when I dry run but the same is not being reflecting in the pods.

@prashant-shahi
Copy link
Member

@sarsony1 We have been using the nodeAffinity and podDistribution, which it works fine for us.

Can you check if the pods are running on the desired pods?

@grandwizard28 grandwizard28 added chart:clickhouse Issue related to clickhouse helm chart question Further information is requested labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:clickhouse Issue related to clickhouse helm chart question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants