Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example configuration for external clickhouse? #146

Open
arrowcircle opened this issue Apr 6, 2020 · 7 comments
Open

Example configuration for external clickhouse? #146

arrowcircle opened this issue Apr 6, 2020 · 7 comments

Comments

@arrowcircle
Copy link

arrowcircle commented Apr 6, 2020

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?

@gyrter
Copy link
Contributor

gyrter commented Apr 13, 2020

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

@arrowcircle
Copy link
Author

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

@gyrter
Copy link
Contributor

gyrter commented Apr 13, 2020

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

@arrowcircle
Copy link
Author

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

@gyrter
Copy link
Contributor

gyrter commented Apr 13, 2020

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

@diafour
Copy link
Contributor

diafour commented Apr 14, 2020

clickhouse.externalEndpoints is a list of IPs for Endpoints resource. Endpoints spec is not supported hostnames: kubernetes/kubernetes#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: #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.

@arrowcircle
Copy link
Author

Any news on that feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants