grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
24.05k stars 3.47k forks source link

Tanka deployment - Change cluster domain #6400

Open JacksonWrath opened 2 years ago

JacksonWrath commented 2 years ago

Is your feature request related to a problem? Please describe. My k8s cluster doesn't use cluster.local, but this is hardcoded in many places in the Tanka libsonnet files. I have to change this every time I upgrade.

Describe the solution you'd like A variable I can specify in main.jsonnet that will be used instead. This is actually the change I make now and it seems to work fine. I'm happy to do a PR with my changes but figured I'd get feedback here first.

Describe alternatives you've considered Alt 1: pipe tk view <environment> into sed to replace the domain, then pipe into kubectl apply. This is ugly. Alt 2: Replace all the hardcoded variables in main.jsonnet file. Just bloats up my config and is prone to error when underlying changes are made.

Additional context For example, change this:

host: 'memcached-frontend.%s.svc.cluster.local' % $._config.namespace,

to this:

host: 'memcached-frontend.%s.svc.%s' % [$._config.namespace, $._config.cluster_domain],
nikzayn commented 2 years ago

@JacksonWrath I would like to take this up!

AravindAkuthota commented 1 month ago

hey @JacksonWrath I would like to work on this

JacksonWrath commented 1 month ago

Go for it! I personally don't need this anymore because so many other projects out there do this same thing and I got tired of dealing with it, so I changed my cluster domain back to cluster.local when I had to do a rebuild 😛