Use LogForwarder from loki_push_api library to forwards all logs from workload container to Loki. This requires to use ops 2.9 or newer, so it was needed to be updated.
fixes: #253
How I tested it:
# deployed the cos following https://charmhub.io/topics/canonical-observability-stack/tutorials/install-microk8s
$ tox -e integration -- --keep-models
$ juju switch test-charm-3uzf
u1-k8s:admin/test-charm-aosq -> u1-k8s:admin/test-charm-3uzf
# we need redeploy charm, since there is test that is removing it
$ charmcraft pack
Created 'seldon-core_ubuntu-20.04-amd64.charm'.
Charms packed:
seldon-core_ubuntu-20.04-amd64.charm
$ juju deploy ./seldon-core_ubuntu-20.04-amd64.charm --resource oci-image=charmedkubeflow/seldon-core-operator:1.17.1-c95840c
Located local charm "seldon-core", revision 0
Deploying "seldon-core" from local charm "seldon-core", revision 0 on ubuntu@20.04/stable
$ juju integrate istio-pilot:gateway-info seldon-core:gateway-info
$ juju consume u1-k8s:cos.loki-logging
Added u1-k8s:admin/cos.loki-logging as loki-logging
$ juju integrate grafana-agent-k8s loki-logging
$ juju integrate seldon-core:logging grafana-agent-k8s
...
And after checking the Grafana, I was able to see all logs.
Use LogForwarder from loki_push_api library to forwards all logs from workload container to Loki. This requires to use ops 2.9 or newer, so it was needed to be updated.
fixes: #253
How I tested it:
And after checking the Grafana, I was able to see all logs.![Screenshot from 2024-07-10 12-37-34](https://github.com/canonical/seldon-core-operator/assets/34167657/6f2b8b01-8cf5-4621-a5fd-822cd2579e07)