Skip to content
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 logging relation to oidc-gatekeeper #155

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

rgildein
Copy link
Contributor

@rgildein rgildein commented Jul 4, 2024

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: #152

How I tested it:

# deployed the cos following https://charmhub.io/topics/canonical-observability-stack/tutorials/install-microk8s
$ tox -e integration -- --keep-models --model kubeflow
$ juju switch kubeflow
$ charmcraft pack
Created 'oidc-gatekeeper_ubuntu-20.04-amd64.charm'.

Charms packed:

    oidc-gatekeeper_ubuntu-20.04-amd64.charm
# need to refresh back to local build of charm
$ juju refresh oidc-gatekeeper --path ./oidc-gatekeeper_ubuntu-20.04-amd64.charm 
Added local charm "oidc-gatekeeper", revision 1, to the model
adding endpoint "logging" to default space "alpha"
no change to endpoints in space "alpha": client-secret, ingress, ingress-auth, oidc-client
$ juju consume u1-k8s:cos.loki-logging
$ juju integrate grafana-agent-k8s loki-logging
$ juju integrate oidc-gatekeeper:logging grafana-agent-k8s 

And after checking the Grafana, I was able to see all logs.
Screenshot from 2024-07-04 18-58-05

Note: I updated all packages for integrations tests, since there was old juju and pytest-operator used, causing some warning. IMO it's ok, since such update do not have any effect to charm functionality.

@rgildein rgildein added the enhancement New feature or request label Jul 4, 2024
@rgildein rgildein self-assigned this Jul 4, 2024
@rgildein rgildein requested a review from a team as a code owner July 4, 2024 17:03
Copy link
Contributor

@DnPlas DnPlas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a tiny comment, other than that lgtm, thanks @rgildein !

requirements-integration.in Outdated Show resolved Hide resolved
@orfeas-k
Copy link
Contributor

orfeas-k commented Jul 5, 2024

Let's also make sure to fix the PR's (and commit's) title

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: #152
@rgildein rgildein force-pushed the feat/KF-5802/log-forwarding branch from 7437aab to ce7205c Compare July 8, 2024 09:13
@rgildein rgildein requested a review from DnPlas July 8, 2024 09:13
@rgildein rgildein changed the title iAdd logging relation to oidc-gatekeeper Add logging relation to oidc-gatekeeper Jul 8, 2024
Copy link
Contributor

@DnPlas DnPlas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rgildein !

@rgildein rgildein merged commit 0ec526d into main Jul 9, 2024
7 checks passed
@rgildein rgildein deleted the feat/KF-5802/log-forwarding branch July 9, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logging relation to oidc-gatekeeper charm
3 participants