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(operator): add version conversion rule for KeptnEvaluationProvider #531

Merged
merged 9 commits into from
Jan 10, 2023

Conversation

thisthat
Copy link
Member

Signed-off-by: Giovanni Liva [email protected]

@thisthat thisthat force-pushed the feat/add-conversion-rules-evalprovider branch from 77ae35e to e48fbd2 Compare December 15, 2022 17:02
@thisthat thisthat changed the title feat(operator): Add version conversion rule for KeptnEvaluationProvider feat(operator): add version conversion rule for KeptnEvaluationProvider Dec 15, 2022
@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #531 (b33247f) into main (b482d96) will increase coverage by 0.11%.
The diff coverage is 83.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #531      +/-   ##
==========================================
+ Coverage   49.94%   50.06%   +0.11%     
==========================================
  Files          60       63       +3     
  Lines        5528     5565      +37     
==========================================
+ Hits         2761     2786      +25     
- Misses       2660     2670      +10     
- Partials      107      109       +2     
Impacted Files Coverage Δ
operator/apis/lifecycle/v1alpha1/common/common.go 100.00% <ø> (ø)
...cle/v1alpha2/keptnevaluationprovider_conversion.go 0.00% <0.00%> (ø)
...ecycle/v1alpha2/keptnevaluationprovider_webhook.go 0.00% <0.00%> (ø)
...cle/v1alpha1/keptnevaluationprovider_conversion.go 100.00% <100.00%> (ø)
...ptnworkloadinstance/reconcile_prepostevaluation.go 81.81% <0.00%> (-9.10%) ⬇️
...lers/lifecycle/keptnworkloadinstance/controller.go 77.55% <0.00%> (-1.54%) ⬇️
Flag Coverage Δ
component-tests 49.96% <ø> (-0.24%) ⬇️
keptn-lifecycle-operator 48.10% <83.78%> (+0.24%) ⬆️
scheduler 21.17% <ø> (ø)

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

@thisthat thisthat marked this pull request as ready for review December 15, 2022 17:15
Copy link
Member

@mowies mowies left a comment

Choose a reason for hiding this comment

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

To enable the conversion webhooks, you need to enable them in the kubebuilder PROJECT file and also enable the corresponding kustomizations. You can check the changes I made to those file in my PR

kubebuilder actually does that for you if you use the CLI to create the conversion webhook files :)

@thisthat thisthat force-pushed the feat/add-conversion-rules-evalprovider branch from af6a4e0 to 46e34be Compare January 9, 2023 14:54
Signed-off-by: Giovanni Liva <[email protected]>
Signed-off-by: Giovanni Liva <[email protected]>
Signed-off-by: Giovanni Liva <[email protected]>
Signed-off-by: Giovanni Liva <[email protected]>
Signed-off-by: Giovanni Liva <[email protected]>
bacherfl
bacherfl previously approved these changes Jan 10, 2023
@odubajDT
Copy link
Contributor

odubajDT commented Jan 10, 2023

Copy link
Member

@mowies mowies left a comment

Choose a reason for hiding this comment

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

like @odubajDT said, you still need to enable the webhook in the kustomization.yaml file. please check his comment on how to do it

operator/kubebuilder Show resolved Hide resolved
Signed-off-by: Giovanni Liva <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Jan 10, 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

@mowies mowies left a comment

Choose a reason for hiding this comment

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

sorry to have more comments, but an integration test for the conversion would be great to verify if the thing works correctly

@thisthat
Copy link
Member Author

sorry to have more comments, but an integration test for the conversion would be great to verify if the thing works correctly

I will take this as follow-up of this PR and introduce multiple tests to also verify all the conversion webhooks we have. For that, I've created #576

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 - I will add an integration test for the evaluationProvider conversions in a follow up PR

Copy link
Member

@mowies mowies left a comment

Choose a reason for hiding this comment

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

LGTM!

@thisthat thisthat merged commit f1e9fe1 into keptn:main Jan 10, 2023
@thisthat thisthat deleted the feat/add-conversion-rules-evalprovider branch January 10, 2023 09:17
@keptn-bot keptn-bot mentioned this pull request Jan 10, 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.

4 participants