Install
Helmfile/Helm​
Add the following in your helmfile.yaml.gotmpl or use helm directly with the same parameters, use the up-to-date sample from the release.
ClickHouse​
- name: clickhouse-secrets
namespace: kosmos-system-restricted
chart: ../../clickhouse/clickhouse-secrets
wait: true
waitForJobs: true
labels:
app: clickhouse
- name: clickhouse-operator
namespace: kosmos-system-restricted
chart: ../../clickhouse/altinity-clickhouse-operator
needs: [kosmos-system-restricted/clickhouse-secrets]
wait: true
labels:
app: clickhouse
values:
- ../../clickhouse/values/values-operator.yaml
- name: clickhouse-cluster
namespace: kosmos-logs
createNamespace: true
chart: ../../clickhouse/clickhouse
needs: [kosmos-system-restricted/clickhouse-operator]
wait: true
waitForJobs: true
labels:
app: clickhouse
values:
- ../../clickhouse/values/values-clickhouse.yaml
- volumeClaim:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 32Gi
Installation with HA​
In order to enable HA, Add Clickhouse-keeper release to your helmfile:
- name: clickhouse-keeper
namespace: kosmos-logs
labels:
app: clickhouse
needs:
- kosmos-system-restricted/clickhouse-operator
chart: ../../clickhouse/keeper
This will deploy 3 instances of clickhouse-keeper by default.
Add also the following highlighted section in the clickhouse-cluster release to launch Clickhouse with a second replica:
- name: clickhouse-cluster
namespace: kosmos-logs
createNamespace: true
chart: ../../clickhouse/clickhouse
needs: [kosmos-system-restricted/clickhouse-operator]
wait: true
waitForJobs: true
labels:
app: clickhouse
values:
- ../../clickhouse/values/values-clickhouse.yaml
# HA overlay
- ../../clickhouse/values/values-clickhouse-ha-overlay.yaml
- volumeClaim:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 32Gi
remarque
Using values-clickhouse-ha-overlay.yaml will create the tables dedicated to logs and audit data storage with the proper replication characteristics.