Skip to content

Commit

Permalink
Add CLICKHOUSE_PORT as option for externalClickhouse configs (#415)
Browse files Browse the repository at this point in the history
* Add CLICKHOUSE_PORT as option for externalClickhouse configs

* Fix tests/env

Co-authored-by: Karl-Aksel Puulmann <[email protected]>
  • Loading branch information
fuziontech and macobo authored Jun 2, 2022
1 parent a60500a commit 6cc47a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/posthog/templates/_clickhouse.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
{{- else -}}
- name: CLICKHOUSE_HOST
value: {{ required "externalClickhouse.host is required if not clickhouse.enabled" .Values.externalClickhouse.host | quote }}
- name: CLICKHOUSE_PORT
value: {{ .Values.externalClickhouse.port | quote }}
- name: CLICKHOUSE_CLUSTER
value: {{ required "externalClickhouse.cluster is required if not clickhouse.enabled" .Values.externalClickhouse.cluster | quote }}
- name: CLICKHOUSE_DATABASE
Expand Down
6 changes: 6 additions & 0 deletions charts/posthog/tests/__snapshot__/_clickhouse.tpl.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ should render with external clickhouse:
1: |
- name: CLICKHOUSE_HOST
value: foo.bar.net
- name: CLICKHOUSE_PORT
value: "9000"
- name: CLICKHOUSE_CLUSTER
value: somecluster
- name: CLICKHOUSE_DATABASE
Expand All @@ -50,6 +52,8 @@ should render with external clickhouse with more custom settings:
1: |
- name: CLICKHOUSE_HOST
value: foo.bar.net
- name: CLICKHOUSE_PORT
value: "9000"
- name: CLICKHOUSE_CLUSTER
value: customCluster
- name: CLICKHOUSE_DATABASE
Expand All @@ -66,6 +70,8 @@ should render with external clickhouse with secrets:
1: |
- name: CLICKHOUSE_HOST
value: foo.bar.net
- name: CLICKHOUSE_PORT
value: "9000"
- name: CLICKHOUSE_CLUSTER
value: somecluster
- name: CLICKHOUSE_DATABASE
Expand Down
2 changes: 2 additions & 0 deletions charts/posthog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,8 @@ clickhouse:
externalClickhouse:
# -- Host of the external cluster. This is required when clickhouse.enabled is false
host:
# -- Port of the external cluster.
port: 9000
# -- Name of the external cluster to run DDL queries on. This is required when clickhouse.enabled is false
cluster:
# -- Database name for the external cluster
Expand Down

0 comments on commit 6cc47a0

Please sign in to comment.