canonical / observability-libs

A collection of charm libraries curated by the Observability team.
https://charmhub.io/observability-libs
Apache License 2.0
3 stars 8 forks source link

Fix cleanup on relation broken #85

Closed PietroPasotti closed 4 months ago

PietroPasotti commented 4 months ago

Might fix https://github.com/canonical/traefik-k8s-operator/issues/340

We need to discuss this a bit though, might want to test some more.

Manual test instructions:

juju deploy traefik-k8s --channel edge traefik
juju deploy self-signed-certificates --channel edge ssc
juju relate traefik:certificates ssc

# OK: 
curl https://<traefik APP IP> --insecure -v  # 404

juju remove-application ssc

juju deploy self-signed-certificates --channel edge ssc2
juju relate traefik:certificates ssc2

# ERROR
curl https://<traefik APP IP> --insecure -v  # ERROR error:0A000458:SSL routines::tlsv1 unrecognized name

# replace the lib

juju scp lib/charms/observability_libs/v1/cert_handler.py traefik/0:/var/lib/juju/agents/unit-traefik-0/charm/lib/charms/observability_libs/v1/cert_handler.py

juju remove-application ssc2

juju deploy self-signed-certificates --channel edge ssc3
juju relate traefik:certificates ssc3

# OK: 
curl https://<traefik APP IP> --insecure -v  # 404