community icon indicating copy to clipboard operation
community copied to clipboard

ack iam labels for metrics service are in the wrong place

Open FernandoMiguel opened this issue 2 years ago • 12 comments
trafficstars

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

FernandoMiguel avatar Oct 17 '23 11:10 FernandoMiguel

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 avatar Oct 21 '23 05:10 gecube

@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 avatar Oct 21 '23 07:10 FernandoMiguel

@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 avatar Oct 23 '23 14:10 a-hilaly

@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.

FernandoMiguel avatar Oct 24 '23 06:10 FernandoMiguel

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,

a-hilaly avatar Oct 24 '23 06:10 a-hilaly

If you are touching the generator, don't forget about annotations too 🤞

FernandoMiguel avatar Oct 24 '23 06:10 FernandoMiguel

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

ack-bot avatar Jun 04 '24 19:06 ack-bot

/remove-lifecycle stale

gecube avatar Jun 04 '24 19:06 gecube

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

ack-bot avatar Dec 02 '24 00:12 ack-bot

/remove-lifecycle stale

gecube avatar Dec 02 '24 07:12 gecube

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

ack-bot avatar May 31 '25 08:05 ack-bot

/remove-lifecycle stale

gecube avatar Jun 01 '25 17:06 gecube