-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add scheme to loki client #293
Comments
We do not need TLS for this. loki-k8s-operator/src/loki_server.py Line 44 in 5a826f1
And with that loki-k8s-operator/src/loki_server.py Line 62 in 5a826f1
We can get Loki's version using the binary. An example of this in Grafana agent: def agent_version_output(self) -> str:
"""Runs `agent -version` and returns the output.
Returns:
Output of `agent -version`
"""
version_output, _ = self._container.exec(["/bin/agent", "-version"]).wait_output()
return version_output |
This is definitely dead code, we are in fact using: https://github.com/canonical/loki-k8s-operator/blob/main/src/charm.py#L509 @property
def _loki_version(self) -> Optional[str]:
"""Returns the version of Loki.
Returns:
A string equal to the Loki version
"""
if not self._container.can_connect():
return None
version_output, _ = self._container.exec(["/usr/bin/loki", "-version"]).wait_output()
# Output looks like this:
# loki, version 2.4.1 (branch: HEAD, ...
result = re.search(r"version (\d*\.\d*\.\d*)", version_output)
if result is None:
return result
return result.group(1) |
Currently the client code has
http
hard-coded:loki-k8s-operator/src/loki_server.py
Line 41 in 5a826f1
Ref: https://github.com/canonical/prometheus-k8s-operator/blob/d33f51f39d990de3b8dcb9436bf69291a8e8b891/src/prometheus_client.py#L20
The text was updated successfully, but these errors were encountered: