Skip to content

Commit

Permalink
Add support for self-hosted ClickHouse (#413)
Browse files Browse the repository at this point in the history
* Add ClickHouse support

* Helm-Docs update

* fixup! Add ClickHouse support

* Helm-Docs update

* Update values.yaml

* Helm-Docs update

* Automate DSN generation

* Helm-Docs update

* fixup! Automate DSN generation

* Update helm-lint-and-install.yaml

* Disable TLS

* Update values.yaml

* Helm-Docs update

* Update values.yaml

* Update values.yaml

* Helm-Docs update

* Update secret-studio.yaml

* Update helm-lint-and-install.yaml

* Update secret-studio.yaml

* Update secret-studio.yaml

* Update helm-lint-and-install.yaml

* Update values.yaml

* Helm-Docs update

---------

Co-authored-by: 0x2b3bfa0 <[email protected]>
  • Loading branch information
0x2b3bfa0 and 0x2b3bfa0 authored Jun 4, 2024
1 parent 22b147e commit d8d82de
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/helm-lint-and-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
ct lint-and-install --target-branch ${{ github.event.repository.default_branch }} --upgrade --skip-missing-values --debug \
--helm-extra-set-args '--set ci=true --set global.blobvault.persistentVolume.storageClassName="standard" --set imagePullSecrets[0].name=iterativeai --set dockerUsername=${{ vars.ITERATIVE_DOCKER_REGISTRY_USER }} --set dockerPassword=${{ secrets.ITERATIVE_DOCKER_REGISTRY_PASSWORD }} --set dockerServer=docker.iterative.ai'
--helm-extra-set-args '--set ci=true --set global.blobvault.persistentVolume.storageClassName="standard" --set clickhouse.auth.password="clickhouse" --set imagePullSecrets[0].name=iterativeai --set dockerUsername=${{ vars.ITERATIVE_DOCKER_REGISTRY_USER }} --set dockerPassword=${{ secrets.ITERATIVE_DOCKER_REGISTRY_PASSWORD }} --set dockerServer=docker.iterative.ai'
helm-docs:
runs-on: ubuntu-latest
Expand Down
7 changes: 5 additions & 2 deletions charts/studio/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 11.9.13
digest: sha256:4d64be3c68e02f9bf8d4468389b628383c33fc3e1902597f637c49ccf2f777d9
generated: "2024-04-30T15:57:25.19756706Z"
- name: clickhouse
repository: https://charts.bitnami.com/bitnami
version: 6.2.0
digest: sha256:5764f9714b4d0e478f5ea25796091919f7ca334773989ac86235c7377db85405
generated: "2024-06-01T16:58:57.386705962Z"
6 changes: 5 additions & 1 deletion charts/studio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: studio
description: A Helm chart for Kubernetes
type: application
version: 0.14.2
version: 0.14.3
appVersion: "v2.119.4"
maintainers:
- name: iterative
Expand All @@ -17,3 +17,7 @@ dependencies:
condition: postgresql.enabled
version: "11.9.13"
repository: "https://charts.bitnami.com/bitnami"
- name: clickhouse
condition: clickhouse.enabled
version: "6.2.0"
repository: "https://charts.bitnami.com/bitnami"
8 changes: 7 additions & 1 deletion charts/studio/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# studio

![Version: 0.14.2](https://img.shields.io/badge/Version-0.14.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.119.4](https://img.shields.io/badge/AppVersion-v2.119.4-informational?style=flat-square)
![Version: 0.14.3](https://img.shields.io/badge/Version-0.14.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.119.4](https://img.shields.io/badge/AppVersion-v2.119.4-informational?style=flat-square)

A Helm chart for Kubernetes

Expand All @@ -14,13 +14,19 @@ A Helm chart for Kubernetes

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | clickhouse | 6.2.0 |
| https://charts.bitnami.com/bitnami | postgresql | 11.9.13 |
| https://charts.bitnami.com/bitnami | redis | 17.14.3 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| clickhouse.auth.password | string | `"clickhouse"` | ClickHouse password |
| clickhouse.enabled | bool | `false` | ClickHouse enabled |
| clickhouse.fullnameOverride | string | `"studio-clickhouse"` | ClickHouse name override |
| clickhouse.replicaCount | int | `1` | |
| clickhouse.shards | int | `1` | |
| global.basePath | string | `""` | Studio: Base path (prefix) |
| global.blobvault.accessKeyId | string | `""` | Blobvault S3 access key ID |
| global.blobvault.bucket | string | `""` | Blobvault S3 bucket name |
Expand Down
6 changes: 5 additions & 1 deletion charts/studio/templates/secret-studio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ stringData:

{{- $dvcx := .Values.global.dvcx | default dict }}
{{- $dvcxClickhouse := $dvcx.clickHouse | default dict }}
DVCX_CH_DSN: {{ $dvcxClickhouse.dsn | default "" | quote }}
{{- if $dvcxClickhouse.dsn }}
DVCX_CH_DSN: {{ $dvcxClickhouse.dsn | quote }}
{{- else if .Values.clickhouse.enabled }}
DVCX_CH_DSN: clickhouse+native://{{ .Values.clickhouse.auth.username }}:{{ .Values.clickhouse.auth.password }}@{{ .Values.clickhouse.fullnameOverride }}.{{ .Release.Namespace }}.svc.cluster.local/default?secure=False
{{- end }}
15 changes: 15 additions & 0 deletions charts/studio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,21 @@ postgresql:
# -- Postgres database
database: iterativeai

clickhouse:
# -- ClickHouse enabled
enabled: false
# -- ClickHouse name override
fullnameOverride: studio-clickhouse

# Shards / replicas configuration
replicaCount: 1
shards: 1

# Change this before deploying
auth:
# -- ClickHouse password
password: "clickhouse"

# -- PgBouncer settings group
pgBouncer:
enabled: false
Expand Down

0 comments on commit d8d82de

Please sign in to comment.