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

Loki config missing if VM running juju and microk8s is restarted or pod is deleted #35

Merged
merged 4 commits into from
Feb 7, 2022

Conversation

Abuelodelanada
Copy link
Contributor

This PR fixes #34.

There are 2 way to test this PR:

Restart VM

  • Deploy Loki and deploy 2 Grafana agents
  • Relate both charms
  • Check the grafana agent config file has the loki section
  • Stop the multipass VM in which Juju and microk8s are running.
  • Start the multipass VM again.
  • Check that once microk8s is up and running again the grafana agent config has the loki section

Delete POD

  • Deploy Loki and deploy 2 Grafana agents
  • Relate both charms
  • Check the grafana agent config file has the loki section
  • Delete the grafana agent pod with: microk8s.kubectl delete pods grafana-agent-k8s-0 -n observability
  • Wait until the pod is deleted and Juju creates a new unit to replace the deleted one.
  • Check grafana agent config has the loki section

@Abuelodelanada Abuelodelanada requested a review from a team February 3, 2022 21:18
Copy link
Contributor

@sed-i sed-i left a comment

Choose a reason for hiding this comment

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

I'm surprised the pod deletion scenario wasn't picked up by the itest
https://github.com/canonical/grafana-agent-k8s-operator/blob/main/tests/integration/test_kubectl_delete.py
Mind giving it a look so it captures it?

src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
@sed-i sed-i requested a review from a team February 3, 2022 21:41
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
@Abuelodelanada Abuelodelanada merged commit 3995d85 into main Feb 7, 2022
@Abuelodelanada Abuelodelanada deleted the 34_config_bug branch February 7, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loki config missing if VM running juju and microk8s is restarted.
5 participants