-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(falcosidekick): Allow overriding the Prometheus scrape Service annotation #779
base: master
Are you sure you want to change the base?
fix(falcosidekick): Allow overriding the Prometheus scrape Service annotation #779
Conversation
Welcome @TiagoJMartins! It looks like this is your first PR to falcosecurity/charts 🎉 |
5fcf244
to
bad73ed
Compare
… on the Service resource Signed-off-by: Tiago Martins <[email protected]>
bad73ed
to
f45a308
Compare
And what about removing the hard-coded annotation and putting it by default in |
@megalucio: changing LGTM is restricted to collaborators In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: megalucio, TiagoJMartins The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Can you rebase on master and fix the conflict please?
I think this comment is valuable, wdyt? |
What type of PR is this?
/kind bug
/kind chart-release
Any specific area of the project related to this PR?
/area falcosidekick-chart
What this PR does / why we need it:
We are working on a migration from a deprecated Prometheus setup to one based on the Prometheus Kubernetes Operator.
Since metrics scraped by the operator-managed instances are targeting ServiceMonitor and PodMonitor resources, we need to be able to configure the
prometheus.io/scrape
Service annotation to gradually disable scraping from our deprecated instances.Which issue(s) this PR fixes:
Because the
prometheus.io/scrape
annotation is hard-coded in the Service template and it's the last entry in theannotations
map, there's no way to include custom values after it.This PR simply moves the hard-coded annotation to before the user-provided values, so at least they have an escape hatch in case they need to override the value.
Special notes for your reviewer:
You can test with:
The final template will include duplicate values, but the override will take precedence when the yaml gets parsed/applied to the cluster.
The duplicated keys will be removed by the cluster.
I considered going with a different approach based on something like
.Values.service.prometheusScrape
, but decided against it due to it requiring changes to thevalues.yaml
structure.Checklist