loghouse icon indicating copy to clipboard operation
loghouse copied to clipboard

Example configuration for external clickhouse?

Open arrowcircle opened this issue 6 years ago • 7 comments

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?

arrowcircle avatar Apr 06 '20 09:04 arrowcircle

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

gyrter avatar Apr 13 '20 09:04 gyrter

But thats crazy limitation. If Cluster IP will change, I will need to redeploy loghouse. Why dont use dns service name?

arrowcircle avatar Apr 13 '20 11:04 arrowcircle

It is rather hard to create and test chart with so many options. I will keep this issue in mind.

gyrter avatar Apr 13 '20 12:04 gyrter

It looks strange, that one of release features is not usable without "custom" hacks.

arrowcircle avatar Apr 13 '20 13:04 arrowcircle

We are using clickhouse on external servers with static IP, internal cluster is next release feature.

gyrter avatar Apr 13 '20 14:04 gyrter

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.

diafour avatar Apr 14 '20 13:04 diafour

Any news on that feature?

arrowcircle avatar Jun 30 '20 13:06 arrowcircle