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(metrics-operator): add basicauth to prometheus provider #2154

Merged
merged 27 commits into from
Sep 28, 2023

Conversation

RealAnna
Copy link
Contributor

closes #2128

this feature allows to send api calls to Prometheus using user and password

@RealAnna RealAnna requested a review from a team as a code owner September 22, 2023 11:57
@netlify
Copy link

netlify bot commented Sep 22, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit 16954d3
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/65141c6d114e1e00088e115c
😎 Deploy Preview https://deploy-preview-2154--keptn-lifecycle-toolkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #2154 (3f2f736) into main (d7fce2a) will decrease coverage by 9.48%.
The diff coverage is 75.43%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2154      +/-   ##
==========================================
- Coverage   84.56%   75.09%   -9.48%     
==========================================
  Files         153       68      -85     
  Lines        9881     4493    -5388     
==========================================
- Hits         8356     3374    -4982     
+ Misses       1237      954     -283     
+ Partials      288      165     -123     
Files Coverage Δ
...tor/controllers/common/providers/datadog/common.go 100.00% <100.00%> (+13.63%) ⬆️
...r/controllers/common/providers/dynatrace/common.go 100.00% <100.00%> (ø)
...-operator/controllers/common/providers/provider.go 100.00% <100.00%> (ø)
.../controllers/common/providers/prometheus/common.go 88.00% <88.00%> (ø)
...perator/api/v1alpha3/keptnmetricsprovider_types.go 65.21% <44.44%> (-34.79%) ⬇️
...trollers/common/providers/prometheus/prometheus.go 82.08% <70.00%> (-1.96%) ⬇️

... and 100 files with indirect coverage changes

Flag Coverage Δ
certificate-operator ?
component-tests 59.13% <ø> (+1.30%) ⬆️
lifecycle-operator ?
metrics-operator 87.26% <75.43%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@odubajDT odubajDT changed the title feat(metrics-operator): add basicauth toprometheus provider feat(metrics-operator): add basicauth to prometheus provider Sep 22, 2023
@RealAnna RealAnna marked this pull request as draft September 25, 2023 06:25
@RealAnna RealAnna marked this pull request as ready for review September 25, 2023 09:49
odubajDT
odubajDT previously approved these changes Sep 26, 2023
renovate bot and others added 5 commits September 27, 2023 14:11
…st to 6566e7d (#2143)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…st to 099a457 (#2169)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
… for specifying time frame (#2147)

Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: realanna <[email protected]>

fix: link

Signed-off-by: realanna <[email protected]>

Update metrics-operator/controllers/common/providers/prometheus/prometheus.go

Co-authored-by: Florian Bacher <[email protected]>
Signed-off-by: RealAnna <[email protected]>

Update metrics-operator/controllers/common/providers/prometheus/common.go

Co-authored-by: Florian Bacher <[email protected]>
Signed-off-by: RealAnna <[email protected]>

fix: embed getter in the struct

Signed-off-by: realanna <[email protected]>

Update metrics-operator/controllers/common/providers/prometheus/prometheus.go

Co-authored-by: odubajDT <[email protected]>
Signed-off-by: RealAnna <[email protected]>

fix: add unit test to make ondrej happy

Signed-off-by: realanna <[email protected]>

fix: removed skip lint

Signed-off-by: realanna <[email protected]>

fix: removed dd special func for secrets

Signed-off-by: realanna <[email protected]>

fix: useless test setup

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): add unit test

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): add unit test

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): add integration test

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): lint

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): lint

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): revert change to ddprovider

Signed-off-by: realanna <[email protected]>

feat(metrics-operator):  fixed test

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): use roundtripper from prometheus api

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): add test of header

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): add unit tests

Signed-off-by: realanna <[email protected]>

feat(metrics-operator): first iteration on prometheus auth

Signed-off-by: realanna <[email protected]>
Signed-off-by: realanna <[email protected]>
@RealAnna RealAnna force-pushed the feat/2128/add_auth_in_prometheus_provider branch from 86bfa52 to 16954d3 Compare September 27, 2023 12:13
@github-actions github-actions bot removed documentation Improvements or additions to documentation ops scheduler cert-manager helm labels Sep 27, 2023
Signed-off-by: realanna <[email protected]>
test/prometheus/secret.yaml Outdated Show resolved Hide resolved
@RealAnna RealAnna marked this pull request as ready for review September 27, 2023 12:19
lifecycle-operator/go.mod Outdated Show resolved Hide resolved
Co-authored-by: odubajDT <[email protected]>
Signed-off-by: RealAnna <[email protected]>
lifecycle-operator/go.mod Outdated Show resolved Hide resolved
Signed-off-by: realanna <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Sep 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@RealAnna RealAnna merged commit bab605e into main Sep 28, 2023
39 of 41 checks passed
@RealAnna RealAnna deleted the feat/2128/add_auth_in_prometheus_provider branch September 28, 2023 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support using access credentials in Prometheus provider
4 participants