-
Notifications
You must be signed in to change notification settings - Fork 59
Moved CRDs to Helm templates folder #552
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
Conversation
Updated the generate script to output CRDs to the correct directory and include the keep resource policy annotation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #552 +/- ##
==========================================
+ Coverage 59.58% 59.63% +0.05%
==========================================
Files 56 56
Lines 5151 5151
==========================================
+ Hits 3069 3072 +3
+ Misses 1798 1797 -1
+ Partials 284 282 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
df1548b to
0900230
Compare
|
kubewarden uses a separate helm chart for crds. Have you consider following the same approach? |
Yes, @bigkevmcd also told me about the two approaches. Speaking with @fabriziosestito he pointed me to the kubewarden/sbomscanner repo. Handling two charts could be very annoying, especially considering the AppCo mirroring, or the UI. |
raulcabello
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your point that having 2 helm chart if more complicated for AppCo and for installing k3k. The proposed approach looks good to me!
bigkevmcd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm broadly fine with this, it would definitely be worthwhile looking at how we're doing this across products with a view to some standardisation?
It would definitely makes sense, even though I have the feeling it will depends a lot by the use case. But we can try to have at least some common patterns for similar approaches. |
Helm doesn't handle CRDs updates automatically. To handle this different strategies are possible. The simplest is to treat CRDs like normal resources, putting them in the
templatesfolder, and adding thehelm.sh/resource-policy: keepannotation, to prevent their deletion.This is the same strategy adopted by
cert-managerorkubewarden.If someone is upgrading from a previous release the CRDs will not have the annotations used by Helm to track the managed resource, and the upgrade will fail. To prevent this the user should upgrade specifying the
--take-ownershipflag, or adding manually the needed labels and annotations:The PR also updates the generate script to output CRDs to the correct directory and include the keep resource policy annotation.