Open rjop-hccgt opened 1 month ago
Yes, I'll take this
/assign
ping @rjop-hccgt
thanks @omerap12
@rjop-hccgt, @omerap12, I think this is on purpose to avoid double scraping by prometheus, see: https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2601
Hey @oliviassss ,
I checked, and you're right—it’s done on purpose. But, with our current approach, we're forcing the use of Prometheus, either by using ServiceMonitor
or annotations on deployments. Should we really be enforcing this?
Describe the bug I believe there is an issue with the Helm chart, particularly in this line (https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/helm/aws-load-balancer-controller/templates/deployment.yaml#L30). I think the logic should be inverted and the prometheus labels should be added only when the
.Values.serviceMonitor.enabled
flag is set totrue
Steps to reproduce
serviceMonitor.enabled
totrue
.helm template ./ --values values.yaml | kubectl apply -f -
Expected outcome The AWS Load Balancer controller deployment shouldn't have the prometheus annotations enabled.
Environment
Additional Context: