diff --git a/HelmChart/Docs/Clickhouse.md b/HelmChart/Docs/Clickhouse.md new file mode 100644 index 0000000000..9a0d8fd360 --- /dev/null +++ b/HelmChart/Docs/Clickhouse.md @@ -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. \ No newline at end of file diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index 7ac848ead4..5fbfc429e7 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -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}} diff --git a/HelmChart/Public/oneuptime/values.yaml b/HelmChart/Public/oneuptime/values.yaml index 4de2005b40..8bd7605a86 100644 --- a/HelmChart/Public/oneuptime/values.yaml +++ b/HelmChart/Public/oneuptime/values.yaml @@ -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