Support pod annotations for sidecar charms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
We filed https:/
"""
We would like to be able to set pod annotations so that Prometheus will scrape all of the pods in our scale>1 deployment.
If we were at scale=1, service annotations would probably be sufficient, although we'd have to update the config to look at service annotations too.
"""
While this bug is fixed for non-sidecar charms, I don't see a way to be able to set pod annotations for non-sidecar charms.
I did try this as well:
```
juju config mattermost kubernetes-
```
But then there's no output from (assuming a model named `mattermost`):
```
microk8s.kubectl describe service -n mattermost | grep prometheus
```
tags: | added: sidecar |
tags: |
added: sidecar-charms removed: sidecar |
tags: |
added: sidecar-charm removed: sidecar-charms |
I would guess that the 'config' step would depend on whether it is able to create the annotations on the associated pods. I believe for a sidecar charm, it would be possible to get access to the K8s API, but it might be harder to figure out what containers/pods need to be annotated, and it would certainly look differently than a previous pod-spec style charm (which could just include the annotations as part of its pod declaration)