Open lucabello opened 2 weeks ago
Analyzing the diff between the charm code for the monolithic charm and the coordinator, I spotted a difference. Specifically, the monolithic charm had this section, which the coordinator does not have:
def __init__(self, *args):
...
self.framework.observe(self.on.logging_relation_changed, self._on_logging_relation_changed)
def _on_logging_relation_changed(self, event):
# If there is a change in logging relation, let's update Loki endpoint
# We are listening to relation_change to handle the Loki scale down to 0 and scale up again
# when it is related with ingress. If not, endpoints will end up outdated in consumer side.
self.loki_provider.update_endpoint(url=self._external_url, relation=event.relation)
Adding this event listener and function to the coordinator fixes this issue!
Fixed by this commit in the PR linked below.
Bug Description
Regardless of Traefik/TLS, the
LokiPushApiProvider
always rendershttp
withsocket.getfqdn()
(see here) instead ofhttps
and theexternal_url
.This makes it impossible to send logs over an ingressed Loki / over TLS.
To Reproduce