Comment 4 for bug 1911365

Revision history for this message
George Kraft (cynerva) wrote :

Yep, so it looks like the existing jobs point to a single IP for the Kubernetes API, but the situation is different here since multiple IPs are needed.

It looks like you'll need to expand on the register_prometheus_jobs handler[1] in one of two ways. Either:

1) Collect IPs for all kubernetes-master units, and include them when rendering templates for services like kube-scheduler, or

2) Create a new handler, without the leadership.is_leader flag, so each kubernetes-master unit can create scrabe jobs for itself.

That's about all the guidance I can offer at the moment.

[1]: https://github.com/charmed-kubernetes/charm-kubernetes-master/blob/bb3328c490f2e05b20010f688be55296623fb7e1/reactive/kubernetes_master.py#L3177