Support pod annotations for sidecar charms

Bug #1923820 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

We filed https://bugs.launchpad.net/juju/+bug/1884177 back in June of 2020 because we wanted to be able to set annotations on pods:

"""
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-service-annotations="prometheus.io/port:8067 prometheus.io/scrape:true"
```
But then there's no output from (assuming a model named `mattermost`):
```
microk8s.kubectl describe service -n mattermost | grep prometheus
```

Tom Haddon (mthaddon)
tags: added: sidecar
tags: added: sidecar-charms
removed: sidecar
tags: added: sidecar-charm
removed: sidecar-charms
Revision history for this message
John A Meinel (jameinel) wrote :

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)

Changed in juju:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This Medium-priority bug has not been updated in 60 days, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.