grafana / loki

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

Multiple deployments of the loki chart using different names does not work #7119

Open erSitzt opened 2 years ago

erSitzt commented 2 years ago

Describe the bug I have a loki namespace with an already running loki (deployed via helm chart too). Tried to install a second loki using a different name ( loki-test ) , because i wanted some separation for testing, but no other namespace. Install fails, because resourcenames are not derived from the name supplied during install. e.g. the services or some of the deployments...

Here are some examples:

Deployment of gateway is not named after the chart name, but the operator is...

loki-test2            loki-gateway                               0/1     1            0           15m
loki-test2            loki-grafana-agent-operator                1/1     1            1           15m
loki                  loki-gateway                               1/1     1            1           80m
loki                  loki-windows-logs-grafana-agent-operator   1/1     1            1           80m

StatefulSets are not named correctly either

loki-test2   loki-read         3/3     16m
loki-test2   loki-write        3/3     16m
loki         loki-read         3/3     80m
loki         loki-write        3/3     80m

Ingresses are using the name

❯ k get ingress -A
NAMESPACE    NAME                CLASS    HOSTS       
kong-istio   kong-admin          <none>   kong-admin.r
loki-test2   loki                <none>   loki.rke2-ze
loki         loki-windows-logs   <none>   loki-win.rke

...but the services dont

loki-test2      loki-gateway                              ClusterIP   10.
loki-test2      loki-memberlist                           ClusterIP   Non
loki-test2      loki-read                                 ClusterIP   10.
loki-test2      loki-read-headless                        ClusterIP   Non
loki-test2      loki-write                                ClusterIP   10.
loki-test2      loki-write-headless                       ClusterIP   Non
loki            loki-gateway                              ClusterIP   10.
loki            loki-memberlist                           ClusterIP   Non
loki            loki-read                                 ClusterIP   10.
loki            loki-read-headless                        ClusterIP   Non
loki            loki-write                                ClusterIP   10.
loki            loki-write-headless                       ClusterIP   Non

This seems to be related to #7118

To Reproduce Steps to reproduce the behavior:

  1. Install Loki using helm with different names than loki

Expected behavior same naming scheme in all resources

Environment:

Screenshots, Promtail config, or terminal output If applicable, add any output to help explain your problem.

erSitzt commented 2 years ago

I changed the title of the issue, because deployments with different names in different namespaces do not work either. e.g. ClusterRole ( if monitoring / selfmonitoring is enabled ) name is not unique.

erSitzt commented 2 years ago

I thought it might have something to do with the way rancher handles helm charts, but i get the same result on the console

rgroothuijsen commented 1 year ago

I changed the title of the issue, because deployments with different names in different namespaces do not work either. e.g. ClusterRole ( if monitoring / selfmonitoring is enabled ) name is not unique.

Curiously, supplying a combination of both custom name and custom namespace does appear to pass installation for me.