Skip to content
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

feat(Prometheus/ServiceMonitor): add configurable tlsConfig & bearerTokenFile for authentication #931

Conversation

eyenx
Copy link
Contributor

@eyenx eyenx commented Jul 28, 2023

This implements a configurable tlsConfig for the serviceMonitor used to grab metrics from the Vault API.

Additionally it adds the possibility to set a bearerTokenFile for authentication purposes.

…okenFile for authentication

Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
@eyenx eyenx requested a review from a team July 28, 2023 13:47
…ting

Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
@eyenx
Copy link
Contributor Author

eyenx commented Oct 10, 2023

@tvoran @swenson @tomhjp

Anyone able to review this pls? It's kinda sad this is laying around without reaction for more than 3 months.

@dtrts
Copy link
Contributor

dtrts commented Nov 14, 2023

I would also like to see this feature added to the chart.

If possible the chance to configure bearerTokenSecret would also be welcomed.

@eyenx
Copy link
Contributor Author

eyenx commented Dec 11, 2023

I would also like to see this feature added to the chart.

If possible the chance to configure bearerTokenSecret would also be welcomed.

Would be nice I know, but HashiCorp does not care about contributions from outsiders. This will be laying around forever or they will implement it by themselves.

@eyenx eyenx requested a review from a team as a code owner December 11, 2023 07:00
@eyenx
Copy link
Contributor Author

eyenx commented Mar 13, 2024

Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR - I appreciate it's been stuck without feedback for a long time, but if you're still interested I'm happy to help you get this landed. I've triggered the test suite and have a few minor comments but this looks pretty close to merging.

Chart.yaml Outdated Show resolved Hide resolved
test/unit/prometheus-servicemonitor.bats Outdated Show resolved Hide resolved
values.yaml Show resolved Hide resolved
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
@eyenx
Copy link
Contributor Author

eyenx commented Apr 2, 2024

Thank you @tomhjp will look at it today

@eyenx eyenx requested a review from a team as a code owner April 2, 2024 09:06
Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
@eyenx eyenx force-pushed the feat/add-tlsConfig-and-Authentication-for-serviceMonitor branch from 100ce36 to 671b27b Compare April 2, 2024 09:09
Signed-off-by: Toni Tauro <toni.tauro@adfinis.com>
@eyenx eyenx requested a review from tomhjp April 2, 2024 09:11
@eyenx
Copy link
Contributor Author

eyenx commented Apr 2, 2024

@tomhjp ready for a review :)

@tvoran tvoran modified the milestones: v0.28.0, v0.29.0 Apr 4, 2024
@tomhjp
Copy link
Contributor

tomhjp commented May 1, 2024

Hey @eyenx, thanks for your patience. I wanted to try writing a proper integration test that exercised these options for real, I've pushed some WIP in (EDIT) c66c9a2.

One thing I learnt while I was looking deeper is that the bearerTokenFile option is deprecated, with users directed to authorization instead: https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.Endpoint. It does seem like a safer and improved pattern, WDYT about supporting authorization instead of bearerTokenFile in this PR?

@tomhjp
Copy link
Contributor

tomhjp commented May 10, 2024

Merged in #1025 - thanks again!

@tomhjp tomhjp closed this May 10, 2024
@eyenx eyenx deleted the feat/add-tlsConfig-and-Authentication-for-serviceMonitor branch October 23, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants