|
| 1 | +--- |
| 2 | +apiVersion: "clickhouse.altinity.com/v1" |
| 3 | +kind: "ClickHouseInstallation" |
| 4 | +metadata: |
| 5 | + name: "clickhouse" |
| 6 | +spec: |
| 7 | + configuration: |
| 8 | + clusters: |
| 9 | + - name: "openedx-demo" |
| 10 | + layout: |
| 11 | + shardsCount: 1 # Shards have not been tested with Aspects and we don't recommend it. |
| 12 | + replicasCount: 1 # Scale as you need/can |
| 13 | + templates: |
| 14 | + podTemplate: server |
| 15 | + volumeClaimTemplate: storage |
| 16 | + users: |
| 17 | + test/networks/ip: |
| 18 | + - "::/0" |
| 19 | + test/profile: default |
| 20 | + test/password: change_me |
| 21 | + test/quota: default |
| 22 | + # Default permissions needed for user creation |
| 23 | + test/access_management: 1 |
| 24 | + test/named_collection_control: 1 |
| 25 | + test/show_named_collections: 1 |
| 26 | + test/show_named_collections_secrets: 1 |
| 27 | + zookeeper: |
| 28 | + nodes: |
| 29 | + - host: chk-clickhouse-keeper-openedx-demo-0-0 |
| 30 | + - host: chk-clickhouse-keeper-openedx-demo-0-1 |
| 31 | + - host: chk-clickhouse-keeper-openedx-demo-0-2 |
| 32 | + files: |
| 33 | + # Enable user replication |
| 34 | + users-replication.xml: | |
| 35 | + <clickhouse> |
| 36 | + <user_directories replace="replace"> |
| 37 | + <users_xml> |
| 38 | + <path>/etc/clickhouse-server/users.xml</path> |
| 39 | + </users_xml> |
| 40 | + <replicated> |
| 41 | + <zookeeper_path>/clickhouse/access/</zookeeper_path> |
| 42 | + </replicated> |
| 43 | + </user_directories> |
| 44 | + </clickhouse> |
| 45 | + # Enable function replication |
| 46 | + functions-replication.xml: | |
| 47 | + <clickhouse> |
| 48 | + <user_defined_zookeeper_path>/udf</user_defined_zookeeper_path> |
| 49 | + </clickhouse> |
| 50 | + templates: |
| 51 | + podTemplates: |
| 52 | + - name: server |
| 53 | + spec: |
| 54 | + containers: |
| 55 | + - name: clickhouse |
| 56 | + image: clickhouse/clickhouse-server:24.8 |
| 57 | + # If you are running a dedicated node group for ClickHouse (and you should) |
| 58 | + # make sure to add it tolerations. |
| 59 | + # tolerations: |
| 60 | + # - key: "clickhouseInstance" |
| 61 | + # operator: "Exists" |
| 62 | + # effect: "NoSchedule" |
| 63 | + # Optional: set the nodegroup name |
| 64 | + # nodeSelector: |
| 65 | + # eks.amazonaws.com/nodegroup: clickhouse_worker |
| 66 | + volumeClaimTemplates: |
| 67 | + - name: storage |
| 68 | + # Do not delete PV if installation is deleted. If a new ClickHouseInstallation is created |
| 69 | + # data will be re-used, allowing recovery of data |
| 70 | + reclaimPolicy: Retain |
| 71 | + spec: |
| 72 | + accessModes: |
| 73 | + - ReadWriteOnce |
| 74 | + resources: |
| 75 | + requests: |
| 76 | + storage: 50Gi |
0 commit comments