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

chore(lifecycle-operator): introduce v1beta1 lifecycle API #2640

Merged
merged 23 commits into from
Dec 21, 2023

Conversation

prakrit55
Copy link
Member

Description

  • added v1beta1 version with the mentioned CRDs
  • integrations test that the CRDs can be applied to the cluster
  • upgrade using helm charts is possible

Fixes #2573

How to test

Please describe how to run the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also provide information about any automatic tests that you added.

  • Manual Test A
  • Unit Test B
  • Integration Test C

Checklist

  • My PR fulfills the Definition of Done of the corresponding issue and not more (or parts if the issue is separated
    into multiple PRs)
  • I used descriptive commit messages to help reviewers understand my thought process
  • I signed off all my commits according to the Developer Certificate of Origin (DCO)
    see Contribution Guide
  • My PR title is formatted according to the semantic PR conventions described in
    the Contribution Guide
  • My code follows the style guidelines of this project (golangci-lint passes, YAMLLint passes)
  • I regenerated the auto-generated docs for Helm and the CRD documentation (if applicable)
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation (if needed)
  • My changes result in all-green PR checks (first-time contributors need to ask a maintainer to approve their test runs)
  • New and existing unit and integration tests pass locally with my changes

Summary

Please include a short summary of the changes and the related issue.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes # (issue)

Checks

  • My PR fulfills the Definition of Done of the corresponding issue and not more (or parts if the issue is separated
    into multiple PRs)
  • I used descriptive commit messages to help reviewers understand my thought process
  • I signed off all my commits according to the Developer Certificate of Origin (DCO)(
    see Contribution Guide)
  • My PR title is formatted according to the semantic PR conventions described in
    the Contribution Guide
  • My content follows the style guidelines of this project (YAMLLint, markdown-lint)
  • I regenerated the auto-generated docs for Helm and the CRD documentation (if applicable)
  • I have performed a self-review of my content including grammar and typo errors and also checked the rendered page
    from the Netlify deploy preview
  • My changes result in all-green PR checks (first-time contributors need to ask a maintainer to approve their test runs)

@prakrit55 prakrit55 requested review from a team as code owners December 6, 2023 07:44
Copy link

netlify bot commented Dec 6, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit 55b52d5
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/6583f6120190240008f9453c
😎 Deploy Preview https://deploy-preview-2640--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.

@odubajDT
Copy link
Contributor

odubajDT commented Dec 6, 2023

Please revert the changes made in the /test folder, as this change should have no effect on the tests, as v1beta1 is still not used in the controller logic

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (5456786) 85.47% compared to head (4aabc61) 86.59%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2640      +/-   ##
==========================================
+ Coverage   85.47%   86.59%   +1.11%     
==========================================
  Files         155      168      +13     
  Lines       10178    11176     +998     
==========================================
+ Hits         8700     9678     +978     
- Misses       1199     1217      +18     
- Partials      279      281       +2     
Files Coverage Δ
...ifecycle/v1alpha3/keptnappcreationrequest_types.go 80.00% <ø> (ø)
...e-operator/apis/lifecycle/v1beta1/common/common.go 100.00% <100.00%> (ø)
...e-operator/apis/lifecycle/v1beta1/common/phases.go 100.00% <100.00%> (ø)
...ator/apis/lifecycle/v1beta1/keptnapp_conversion.go 100.00% <100.00%> (ø)
...is/lifecycle/v1beta1/keptnappversion_conversion.go 100.00% <100.00%> (ø)
...fecycle/v1beta1/keptnevaluationdefinition_types.go 100.00% <100.00%> (ø)
...-operator/apis/lifecycle/v1beta1/keptnapp_types.go 93.10% <93.10%> (ø)
...lifecycle/v1beta1/keptnappcreationrequest_types.go 80.00% <80.00%> (ø)
...or/apis/lifecycle/v1beta1/keptnevaluation_types.go 97.29% <97.29%> (ø)
...operator/apis/lifecycle/v1beta1/keptntask_types.go 97.59% <97.59%> (ø)
... and 4 more
Flag Coverage Δ
certificate-operator 67.42% <ø> (ø)
component-tests 56.36% <ø> (ø)
lifecycle-operator 86.27% <97.99%> (+1.83%) ⬆️
metrics-operator 87.43% <ø> (ø)
scheduler 36.53% <ø> (ø)

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

@github-actions github-actions bot added the ops label Dec 7, 2023
@bacherfl
Copy link
Member

@prakrit55 I think we can remove the _conversion.go files in the v1beta1 directory. I just tried it out and as long as nothing in the structure of the types has changed - which is the case at this point, as all the actual changes are about to be implemented in future PRs, no conversion logic is needed.
What I would ask to add to this PR though, is an addition to the Kuttl test to really verify that the conversion between versions is working. The test should be similar as the one we already have here: https://github.com/keptn/lifecycle-toolkit/tree/main/test/integration/api-conversion

I would suggest to create the new test in a directory called test/integration/api-conversion-v1beta1.
And similarly as in the previous api-conversion directory, the test should consist of 2 steps:

  1. Apply the hub versions (v1alpha4 for the KeptnWorkloadVersion and v1alpha3 for all others) of the CRDs in 00-install.yaml, and verify that we can retrieve the related v1betaversions in00-assert.yaml`
  2. Apply the v1beta1 versions of the CRDs in 01-install.yaml, and verify that we can retrieve the hub versions (v1alpha4 for the KeptnWorkloadVersion and v1alpha3 for all others) in 01-assert.yaml

@bacherfl
Copy link
Member

Hi @prakrit55 any news on that one? If you need support, please feel free to reach out

@prakrit55
Copy link
Member Author

Hi @prakrit55 any news on that one? If you need support, please feel free to reach out

Hey @bacherfl, I got stuck somehow, because of the university exams I m not able to push the changes. Would u mind if I make the changes tomorrow ?

configured assert

Signed-off-by: Prakriti Mandal <[email protected]>
added tests

Signed-off-by: Prakriti Mandal <[email protected]>
configured assert

Signed-off-by: Prakriti Mandal <[email protected]>
added test

Signed-off-by: Prakriti Mandal <[email protected]>
fixed lint

Signed-off-by: Prakriti Mandal <[email protected]>
fixed lint

Signed-off-by: Prakriti Mandal <[email protected]>
fixed lint

Signed-off-by: Prakriti Mandal <[email protected]>
fixed lint

Signed-off-by: Prakriti Mandal <[email protected]>
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
1.2% Duplication on New Code

See analysis details on SonarCloud

@bacherfl bacherfl merged commit 11b7ea2 into keptn:main Dec 21, 2023
43 of 44 checks passed
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 lifecycle-operator ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce v1beta1 lifecycle API
3 participants