I tried to replicate the test scenario and got slightly different results.
When I removed the "coredns kubernetes-control-plane" relation, the consuming model ran the relation broken/departed hooks on the k8s control plan units as expected, and the relation was removed.
For my setup, on the offering side, the unit agent does not run the relation removal hooks because the coredns/0 unit goes into error with "crash loop backoff". Looking at the k8s namespace, we see the coredns-0 pod is failing liveness/readiness probes
arning Unhealthy 16m (x2 over 16m) kubelet Liveness probe failed: Get "http://192.168.108.66:38813/v1/health?level=alive": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Warning Unhealthy 11m (x52 over 16m) kubelet Readiness probe failed: Get "http://192.168.108.66:38813/v1/health?level=ready": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Warning BackOff 6m47s (x8 over 7m29s) kubelet Back-off restarting failed container
Warning Unhealthy 109s (x15 over 16m) kubelet Startup probe failed: Get "http://192.168.108.66:3856/startup": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
This is different to what you saw where the relation departed/broken hooks did appear to run.
I tried to replicate the test scenario and got slightly different results. control- plane" relation, the consuming model ran the relation broken/departed hooks on the k8s control plan units as expected, and the relation was removed.
When I removed the "coredns kubernetes-
For my setup, on the offering side, the unit agent does not run the relation removal hooks because the coredns/0 unit goes into error with "crash loop backoff". Looking at the k8s namespace, we see the coredns-0 pod is failing liveness/readiness probes
arning Unhealthy 16m (x2 over 16m) kubelet Liveness probe failed: Get "http:// 192.168. 108.66: 38813/v1/ health? level=alive": context deadline exceeded (Client.Timeout exceeded while awaiting headers) 192.168. 108.66: 38813/v1/ health? level=ready": context deadline exceeded (Client.Timeout exceeded while awaiting headers) 192.168. 108.66: 3856/startup": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Warning Unhealthy 11m (x52 over 16m) kubelet Readiness probe failed: Get "http://
Warning BackOff 6m47s (x8 over 7m29s) kubelet Back-off restarting failed container
Warning Unhealthy 109s (x15 over 16m) kubelet Startup probe failed: Get "http://
This is different to what you saw where the relation departed/broken hooks did appear to run.