community
community copied to clipboard
ack iam labels for metrics service are in the wrong place
Describe the bug ack iam labels for metrics service are in the wrong place
Steps to reproduce https://github.com/aws-controllers-k8s/iam-controller/blob/5e28d6c944934b6df857106962230276d44eddf6/helm/templates/metrics-service.yaml#L20
Expected outcome should be under labels https://github.com/aws-controllers-k8s/iam-controller/blob/5e28d6c944934b6df857106962230276d44eddf6/helm/templates/metrics-service.yaml#L7
Hi! I am not a developer of ACK, but probably could it be more clearly if I'd ask you to fork the repo and make a PR (and give a link here)?
@gecube i could provide a PR, but before doing so I would like to understand why it was done this way. Maybe there is a reason. Or maybe it was just an introduced bug.
@FernandoMiguel not sure if they are misplaced, could you clarify why? The mentioned the labels are deployment.labels, and they are placed in the selectors of the service, to be able to to route the controller pod.
@a-hilaly i was trying to annotate the service so it would be scrapped by prometheus and wirh those annotations/labels being in the selector, it won't work.
I would prefer annotations, but I can work with labels too. But neither are available for this service.
I see. @FernandoMiguel @gecube Would it make sense to add a new helm chart value to inject labels for the service resourec? Thinking we can add some here https://github.com/aws-controllers-k8s/code-generator/blob/main/templates/helm/values.yaml.tpl#L69-L76 I'm not super opinionated here.. we could re-use the deployment labels, but it' doesn't look very elegant,
If you are touching the generator, don't forget about annotations too 🤞
Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale
/remove-lifecycle stale
Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale
/remove-lifecycle stale
Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale
/remove-lifecycle stale