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 validating webhook for Keptn Metrics #668

Merged
merged 13 commits into from
Jan 23, 2023

Conversation

RealAnna
Copy link
Contributor

@RealAnna RealAnna commented Jan 20, 2023

closes #662

How to test:

make build-deploy-dev-environment RELEASE_REGISTRY=yourrreg
kubectl apply -f test/integration/metrics/goodmetric.yaml
kubectl apply -f test/integration/metrics/badmetric.yaml

image

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Merging #668 (e27571d) into main (da8fcee) will increase coverage by 0.21%.
The diff coverage is 61.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #668      +/-   ##
==========================================
+ Coverage   56.39%   56.61%   +0.21%     
==========================================
  Files          82       83       +1     
  Lines        6683     6753      +70     
==========================================
+ Hits         3769     3823      +54     
- Misses       2755     2770      +15     
- Partials      159      160       +1     
Impacted Files Coverage Δ
...tor/apis/metrics/v1alpha1/zz_generated.deepcopy.go 0.00% <0.00%> (ø)
...rator/apis/metrics/v1alpha1/keptnmetric_webhook.go 63.15% <63.15%> (ø)
...okcontroller/keptnwebhookcertificate_controller.go 53.84% <69.56%> (+3.02%) ⬆️
...rs/keptnwebhookcontroller/webhook_configuration.go 100.00% <100.00%> (ø)
...perator/apis/metrics/v1alpha1/keptnmetric_types.go 100.00% <100.00%> (ø)
...ptnworkloadinstance/reconcile_prepostevaluation.go 81.81% <0.00%> (-9.10%) ⬇️
...lers/lifecycle/keptnworkloadinstance/controller.go 78.24% <0.00%> (+1.85%) ⬆️
...ptnworkloadinstance/reconcile_prepostdeployment.go 90.90% <0.00%> (+9.09%) ⬆️
Flag Coverage Δ
component-tests 53.54% <ø> (+0.70%) ⬆️
keptn-cert-manager 68.35% <78.12%> (+0.78%) ⬆️
keptn-lifecycle-operator 52.10% <51.92%> (+0.08%) ⬆️
scheduler 21.17% <ø> (ø)

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

Signed-off-by: realanna <anna.reale@dynatrace.com>

added validation webhook in operator

Signed-off-by: realanna <anna.reale@dynatrace.com>

added validation webhook in operator

Signed-off-by: realanna <anna.reale@dynatrace.com>

added validation webhook in operator

Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
@RealAnna RealAnna marked this pull request as ready for review January 20, 2023 13:54
Signed-off-by: realanna <anna.reale@dynatrace.com>

Update operator/apis/metrics/v1alpha1/keptnmetric_webhook.go

Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>
RealAnna and others added 2 commits January 23, 2023 11:08
Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
@sonarcloud
Copy link

sonarcloud bot commented Jan 23, 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 a4cc579 into main Jan 23, 2023
@RealAnna RealAnna deleted the feat/662/validating_webhook branch January 23, 2023 12:03
@keptn-bot keptn-bot mentioned this pull request Jan 23, 2023
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.

Create a Validating Webhook for KeptnMetric CRD
4 participants