Update CLICKHOUSE_PORT value in _helpers.tpl and add clickhouse.service.ports.http in values.yaml

This commit is contained in:
Simon Larsen
2024-03-24 11:14:23 +00:00
parent bab36f9b86
commit 4901749ae6
3 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
### Clickhouse Ops
To access clickhouse use port forwarding in kubernetes
```
kubectl port-forward --address 0.0.0.0 service/oneuptime-oneuptime 8123:8123
```
then you should be able to access from the localhost and port 8123
```
# Username for Postgres user is `clickhouse`
kubectl get secret/oneuptime-clickhouse -o go-template='{{(index .data "admin-password") | base64decode}}'
```
Important: Please ignore % in the end of the password output.

View File

@@ -109,7 +109,7 @@
- name: CLICKHOUSE_HOST
value: {{ $.Release.Name }}-clickhouse.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }}
- name: CLICKHOUSE_PORT
value: {{ printf "8123" | squote}}
value: {{ printf "%s" $.Values.clickhouse.service.ports.http | squote }}
- name: CLICKHOUSE_DATABASE
value: {{ printf "oneuptime" | squote}}

View File

@@ -51,6 +51,9 @@ postgresql:
clickhouse:
clusterDomain: *global-cluster-domain
service:
ports:
http: "8123"
shards: 1
replicaCount: 1
terminationGracePeriodSeconds: 0 # We do this because we do not want to wait for the pod to terminate in case of node failure. https://medium.com/tailwinds-navigator/kubernetes-tip-how-statefulsets-behave-differently-than-deployments-when-node-fails-d29e36bca7d5