This is kubernetes custom controller designed for a very specific use-case. It watches the current replica count of a statefulset in a namespace and updates the remote-read endponts of a prometheus config accordingly. The watched statefulset pods are meant to be prometheus shards and the configmap to be updated is meant to contain a valid prometheus config("prometheus.yml").
The controller requires the following environment variables to be set to work properly
Name | Description |
---|---|
STS_NAME | statefulset to be watched |
NAMESPACE | namespace of the statefulset to be watched |
CONFIG_TO_UPDATE | configmap containing the prometheus configuration("prometheus.yml") |