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: add support for multiple metrics providers #1193

Merged
merged 21 commits into from
Apr 19, 2023

Conversation

mowies
Copy link
Member

@mowies mowies commented Apr 6, 2023

This PR

  • adds support for multiple KeptnMetricsProviders by introducing a new type field in the metrics provider
  • adds validation to the new type field so that it can only have valid metrics provider values (i.e. prometheus | dynatrace | dql | datadog)
  • adds a new API version to the metrics.keptn.sh API group (v1alpha3)
  • moves the hub version to metrics.keptn.sh/v1alpha3
  • adds conversion functions to older versions where needed (and also refactors some existing conversion functions into their own files)
  • change the metrics kuttl integration test by removing the obsolete badmetric check and replacing it with checks for multiple providers with the same type and different names to ensure backwards compatibility of the feature

Fixes #1144

Docs will be updated in a separate PR

@netlify
Copy link

netlify bot commented Apr 6, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit 394ae99
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/643d1736d7e0c700083c6550
😎 Deploy Preview https://deploy-preview-1193--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 settings.

@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #1193 (230e813) into main (99ef223) will increase coverage by 0.57%.
The diff coverage is 98.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1193      +/-   ##
==========================================
+ Coverage   58.94%   59.52%   +0.57%     
==========================================
  Files         128      133       +5     
  Lines       10040    10144     +104     
==========================================
+ Hits         5918     6038     +120     
+ Misses       3902     3888      -14     
+ Partials      220      218       -2     
Impacted Files Coverage Δ
metrics-operator/api/v1alpha1/keptnmetric_types.go 100.00% <ø> (+4.00%) ⬆️
metrics-operator/api/v1alpha2/keptnmetric_types.go 100.00% <ø> (+20.00%) ⬆️
...cs-operator/api/v1alpha3/keptnmetric_conversion.go 0.00% <0.00%> (ø)
...trics-operator/api/v1alpha3/keptnmetric_webhook.go 0.00% <ø> (ø)
...tor/controllers/common/providers/datadog/common.go 86.36% <ø> (ø)
...or/controllers/common/providers/datadog/datadog.go 76.92% <ø> (ø)
...r/controllers/common/providers/dynatrace/common.go 100.00% <ø> (ø)
...ontrollers/common/providers/dynatrace/dynatrace.go 81.66% <ø> (ø)
...ollers/common/providers/dynatrace/dynatrace_dql.go 75.86% <ø> (ø)
...trollers/common/providers/prometheus/prometheus.go 85.36% <ø> (ø)
... and 6 more

... and 7 files with indirect coverage changes

Flag Coverage Δ
certificate-operator 64.15% <ø> (ø)
component-tests 60.79% <ø> (+0.86%) ⬆️
lifecycle-operator 78.26% <ø> (+0.01%) ⬆️
metrics-operator 79.03% <98.31%> (+1.45%) ⬆️
scheduler 21.75% <ø> (ø)

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

@mowies mowies changed the title feat: support multiple metrics providers feat: add support for multiple metrics providers Apr 11, 2023
@mowies mowies force-pushed the multi-provider-support branch from 5d91dae to 394ae99 Compare April 17, 2023 09:53
@github-actions github-actions bot removed the operator label Apr 17, 2023
@mowies mowies force-pushed the multi-provider-support branch from 66d606c to 0b0dfff Compare April 17, 2023 11:09
@mowies mowies force-pushed the multi-provider-support branch from 36ecbb6 to 4d74a41 Compare April 18, 2023 11:04
@mowies mowies marked this pull request as ready for review April 18, 2023 11:05
mowies and others added 2 commits April 18, 2023 13:33
mowies added 2 commits April 18, 2023 14:26
Signed-off-by: Moritz Wiesinger <[email protected]>
odubajDT
odubajDT previously approved these changes Apr 18, 2023
Copy link
Contributor

@odubajDT odubajDT left a comment

Choose a reason for hiding this comment

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

awesome job :)

Signed-off-by: Moritz Wiesinger <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Apr 18, 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

Copy link
Member

@bacherfl bacherfl left a comment

Choose a reason for hiding this comment

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

nice work!

@mowies mowies merged commit 3c465d0 into keptn:main Apr 19, 2023
@keptn-bot keptn-bot mentioned this pull request Apr 19, 2023
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.

Metric Server :: Support Multiple Providers
3 participants