From d777e5e51071d7f504986550694b63eae0b894b1 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Tue, 26 Nov 2024 20:33:39 +0100 Subject: [PATCH] feat(clickhouse): deploy cluster --- clickhouse/kustomization.yaml | 25 +++++++++--------- clickhouse/resources/plausible-db.yaml | 35 ++++++++++++++++++++++++++ plausible/pw | 1 + 3 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 clickhouse/resources/plausible-db.yaml create mode 100644 plausible/pw diff --git a/clickhouse/kustomization.yaml b/clickhouse/kustomization.yaml index a213a09..5d436f6 100644 --- a/clickhouse/kustomization.yaml +++ b/clickhouse/kustomization.yaml @@ -4,17 +4,18 @@ kind: Kustomization namespace: clickhouse-system resources: -- resources/namespace.yaml -- https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/deploy/operator/clickhouse-operator-install-bundle.yaml + - resources/namespace.yaml + - https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/deploy/operator/clickhouse-operator-install-bundle.yaml + - resources/plausible-db.yaml patches: -- patch: |- - - op: add - path: /metadata/labels - value: - prometheus: default - target: - group: core - kind: Namespace - name: clickhouse-operator - version: v1 + - patch: |- + - op: add + path: /metadata/labels + value: + prometheus: default + target: + group: core + kind: Namespace + name: clickhouse-operator + version: v1 diff --git a/clickhouse/resources/plausible-db.yaml b/clickhouse/resources/plausible-db.yaml new file mode 100644 index 0000000..e0dae8d --- /dev/null +++ b/clickhouse/resources/plausible-db.yaml @@ -0,0 +1,35 @@ +apiVersion: "clickhouse.altinity.com/v1" +kind: "ClickHouseInstallation" +metadata: + name: "plausible-db" +spec: + defaults: + templates: + dataVolumeClaimTemplate: data-volume-template + logVolumeClaimTemplate: log-volume-template + configuration: + users: + plausible/password_sha256_hex: a374efcf8b9693f8d28dd4f097d199f0005903dfb9728ade188f0c30b4827078 + clusters: + - name: "plausible" + layout: + shardsCount: 1 + replicasCount: 1 + templates: + volumeClaimTemplates: + - name: data-volume-template + spec: + storageClassName: "hcloud-volumes" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + - name: log-volume-template + spec: + storageClassName: "hcloud-blob" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi diff --git a/plausible/pw b/plausible/pw new file mode 100644 index 0000000..bbfa239 --- /dev/null +++ b/plausible/pw @@ -0,0 +1 @@ +ToLqfKE7y4wFvVbz