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 katib-controller #195

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

rgildein
Copy link
Contributor

@rgildein rgildein commented Jun 17, 2024

Added logging relation and cos integration tests from chisme.

fixes: #187

How I tested it:

from terminal

$ tox -e integration -- --keep-models
$ juju switch test-charm-b81i  # change to test model 
$ juju consume u1-k8s:cos.loki-logging
$ juju integrate loki-logging grafana-agent-k8s
$ juju config katib-controller custom_images='{"default_trial_template": "custom:1.0", "early_stopping__medianstop": "custom:2.1"}'  # revert changes from test_blocked_on_invalid_config test
$ kubectl logs -n test-charm-b81i katib-controller-0 --container katib-controller --tail 100 | grep '\[katib-controller\]'
2024-06-17T13:36:27.023Z [katib-controller] {"level":"info","ts":"2024-06-17T13:36:27Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:36:27.026Z [katib-controller] {"level":"info","ts":"2024-06-17T13:36:27Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:36:35.243Z [katib-controller] {"level":"info","ts":"2024-06-17T13:36:35Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:36:35.246Z [katib-controller] {"level":"info","ts":"2024-06-17T13:36:35Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:36:42.644Z [katib-controller] {"level":"info","ts":"2024-06-17T13:36:42Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:36:42.647Z [katib-controller] {"level":"info","ts":"2024-06-17T13:36:42Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:38:07.977Z [katib-controller] {"level":"info","ts":"2024-06-17T13:38:07Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:38:07.980Z [katib-controller] {"level":"info","ts":"2024-06-17T13:38:07Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:45:30.652Z [katib-controller] {"level":"info","ts":"2024-06-17T13:45:30Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:45:30.655Z [katib-controller] {"level":"info","ts":"2024-06-17T13:45:30Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:45:44.802Z [katib-controller] {"level":"info","ts":"2024-06-17T13:45:44Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:45:44.807Z [katib-controller] {"level":"info","ts":"2024-06-17T13:45:44Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:50:06.794Z [katib-controller] {"level":"info","ts":"2024-06-17T13:50:06Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}
2024-06-17T13:50:06.797Z [katib-controller] {"level":"info","ts":"2024-06-17T13:50:06Z","logger":"controller-runtime.certwatcher","msg":"Updated current TLS certificate"}

I visit http://<ip>/cos-grafana/explore to explore the logs and see:
Screenshot from 2024-06-17 15-52-07

Duplicated logs are also visible with kubectl, so if that's an issue we should report it, but fix by this PR.

Added logging relation and cos integration tests from chisme.

fixes: #187
@rgildein rgildein self-assigned this Jun 17, 2024
@rgildein rgildein requested a review from a team as a code owner June 17, 2024 13:54
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.

It is looking really good, just a tiny nit. I will run some manual tests and report my findings. Thanks @rgildein !

charms/katib-controller/requirements-integration.txt Outdated Show resolved Hide resolved
DnPlas
DnPlas previously approved these changes Jun 21, 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.

I have run both the integration tests and the manual tests. Thanks @rgildein !

EDIT: I approved the PR, but there is a conflict with a file. Please rebase your branch and I can re-approve if needed.

@rgildein rgildein requested a review from DnPlas June 27, 2024 12:24
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 6031b0b into main Jun 28, 2024
16 checks passed
@rgildein rgildein deleted the feat/KF-5776/add-logging-relation branch June 28, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logging relation to katib-controller charm
2 participants