canonical / loki-k8s-operator

https://charmhub.io/loki-k8s
Apache License 2.0
10 stars 16 forks source link

LokiPushApiProvider renders incorrect loki api endpoint #463

Closed lucabello closed 1 month ago

lucabello commented 1 month ago

Bug Description

Regardless of Traefik/TLS, the LokiPushApiProvider always renders http with socket.getfqdn() (see here) instead of https and the external_url.

This makes it impossible to send logs over an ingressed Loki / over TLS.

To Reproduce

juju deploy loki-k8s loki --channel=latest/edge --trust
juju deploy traefik-k8s traefik --channel=latest/edge --trust

juju relate loki:logging traefik
juju relate loki:ingress traefik

jhack show-relation loki:logging traefik

Environment

-

Relevant log output

-

Additional context

No response

lucabello commented 1 month ago

After further investigation, it turns out this issue doesn't happen with the Loki monolithic charm, but only with the Loki coordinator.

Closing in favor of https://github.com/canonical/loki-coordinator-k8s-operator/issues/14.