Example configuration for external clickhouse?
Hi! Thanks for the great work. I am trying to install loghouse with external clickhouse server, but have a problem. I always get config errors.
If I set server name to dns name inside kubernetes cluster, I get error about . in name:
clickhouse:
external: true
server: clickhouse.clickhouse
...
If I add external endpoints, it requires IP address:
clickhouse:
external: true
externalEndpoints:
- clickhouse.clickhouse
...
What is the proper way (or example) of setting loghouse with external clickhouse?
Hello. You can use this code in chart values. Only IP allowed.
If you want to use loghouse with k8s clickhouse - use Cluster IP for your service.
clickhouse:
external: true
externalEndpoints:
- 172.17.0.2
But thats crazy limitation. If Cluster IP will change, I will need to redeploy loghouse. Why dont use dns service name?
It is rather hard to create and test chart with so many options. I will keep this issue in mind.
It looks strange, that one of release features is not usable without "custom" hacks.
We are using clickhouse on external servers with static IP, internal cluster is next release feature.
clickhouse.externalEndpoints is a list of IPs for Endpoints resource. Endpoints spec is not supported hostnames: https://github.com/kubernetes/kubernetes/issues/13358
clickhouse.server is the name for the Service resource, it is not a hostname of the clickhouse server (external or internal) — hence the error about a dot.
We have a plan to support different setups for clickhouse, it is here: https://github.com/flant/loghouse/issues/47
Right now the chart supports these setups:
- "internal" clickhouse in a StatefulSet, created with the chart.
- "external" clickhouse that resides outside the k8s cluster and has static IPs.
It seems that your clickhouse setup has a Service with ClusterIP, so it's an "internal custom" setup and there is no need for Endpoints and Service resources and chart should just pass clickhouse.server to the fluentd and the loghouse. I will add this option to the mentioned issue.
Any news on that feature?