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 aggregation field in KeptnMetric #1780

Merged

Conversation

rakshitgondwal
Copy link
Member

Fixes #1779

Changes made:

  • Added a new field in the KeptnMetric struct.
  • Values accepted for this field: p90, p95, p99, max, min, median, avg.
  • If range.step is not defined and range.aggregation is defined, a field.Required error would be shown.
  • If range.aggregation is not defined and range.step is defined, a field.Required error would be shown.

@netlify
Copy link

netlify bot commented Jul 25, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit 9c506c2
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/64ca3e6de756620008e93d8a
😎 Deploy Preview https://deploy-preview-1780--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.

@rakshitgondwal rakshitgondwal changed the title feat: add aggregation field in `KeptnMetric feat: add aggregation field in KeptnMetric Jul 25, 2023
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #1780 (9c506c2) into main (ee2abea) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1780      +/-   ##
==========================================
+ Coverage   63.57%   63.67%   +0.10%     
==========================================
  Files         143      143              
  Lines       10937    10957      +20     
==========================================
+ Hits         6953     6977      +24     
+ Misses       3722     3719       -3     
+ Partials      262      261       -1     
Files Changed Coverage Δ
metrics-operator/api/v1alpha3/keptnmetric_types.go 100.00% <ø> (ø)
...trics-operator/api/v1alpha3/keptnmetric_webhook.go 94.87% <100.00%> (+1.76%) ⬆️

... and 1 file with indirect coverage changes

Flag Coverage Δ
certificate-operator 68.55% <ø> (ø)
component-tests 58.95% <ø> (+0.81%) ⬆️
lifecycle-operator 84.91% <ø> (ø)
metrics-operator 83.02% <100.00%> (+0.29%) ⬆️
scheduler 32.12% <ø> (ø)

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

rakshitgondwal and others added 4 commits July 28, 2023 15:52
@rakshitgondwal rakshitgondwal marked this pull request as ready for review August 2, 2023 00:08
@rakshitgondwal rakshitgondwal requested a review from a team as a code owner August 2, 2023 00:08
@bacherfl
Copy link
Member

bacherfl commented Aug 2, 2023

Implementation wise this looks good! Can you please also update the CRD docs by executing the following command:

./.github/scripts/generate-crd-docs/generate-crd-docs.sh

Note: It seems like currently the workflow for checking whether the CRD docs are up to date is currently not executed. I created an issue for that in #1817 (this is of course out of scope for this PR)

Signed-off-by: Rakshit Gondwal <[email protected]>
@rakshitgondwal rakshitgondwal requested a review from a team as a code owner August 2, 2023 11:24
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 2, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 2, 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.

lgtm, great work!

Copy link
Member

@thisthat thisthat left a comment

Choose a reason for hiding this comment

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

Well done 👏

@thisthat
Copy link
Member

thisthat commented Aug 3, 2023

The failing html tests are not due to this PR :)

@thisthat thisthat merged commit c0b66ea into keptn:main Aug 3, 2023
@rakshitgondwal
Copy link
Member Author

Thank you for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation metrics-operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce aggregation field for KeptnMetric
3 participants