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

Allow access to Prometheus in OpenShift via SA token #1338

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

wwadge
Copy link
Contributor

@wwadge wwadge commented Jan 6, 2023

Fixes: #1064

We can already access prometheus using Basic Auth. This PR adds support to access prometheus using Authorization: Bearer token too.

Signed-off-by: Wallace Wadge wwadge@gmail.com

Copy link
Member

@aryan9600 aryan9600 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 opening this PR!

pkg/metrics/providers/prometheus.go Outdated Show resolved Hide resolved
pkg/metrics/providers/prometheus_test.go Outdated Show resolved Hide resolved
pkg/metrics/providers/prometheus_test.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2023

Codecov Report

Base: 54.24% // Head: 54.27% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (f280f27) compared to base (58270dd).
Patch coverage: 60.00% of modified lines in pull request are covered.

❗ Current head f280f27 differs from pull request most recent head a50d7de. Consider uploading reports for the commit a50d7de to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1338      +/-   ##
==========================================
+ Coverage   54.24%   54.27%   +0.02%     
==========================================
  Files          84       84              
  Lines       10016    10022       +6     
==========================================
+ Hits         5433     5439       +6     
  Misses       3927     3927              
  Partials      656      656              
Impacted Files Coverage Δ
pkg/metrics/providers/prometheus.go 64.28% <60.00%> (+2.32%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@wwadge wwadge requested review from aryan9600 and removed request for stefanprodan January 17, 2023 08:30
@aryan9600
Copy link
Member

@wwadge Could you please squash all commits into one?

@wwadge
Copy link
Contributor Author

wwadge commented Jan 17, 2023

@wwadge Could you please squash all commits into one?

Done

Copy link
Member

@aryan9600 aryan9600 left a comment

Choose a reason for hiding this comment

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

just one small nitpick, and we should be good to go :)

pkg/metrics/providers/prometheus_test.go Outdated Show resolved Hide resolved
Fixes: fluxcd#1064

Signed-off-by: Wallace Wadge <wwadge@gmail.com>
Copy link
Member

@aryan9600 aryan9600 left a comment

Choose a reason for hiding this comment

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

LGTM!
thanks @wwadge 🙇

@aryan9600 aryan9600 merged commit c65d072 into fluxcd:main Jan 18, 2023
@wwadge wwadge deleted the add-prometheus-bearer-auth branch January 18, 2023 14:09
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.

Allow access to Prometheus/Thanos-Querier in OpenShift via SA token
3 participants