-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add configurable storage class name for image resource #1029
Conversation
tylerphelan
commented
Sep 6, 2022
- If set, will be used as the storageClassName in the pvc
daedd68
to
d00253c
Compare
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.
It looks good to me!
I'm wondering if we actually need to validate that the storage class exists since that will require additional rbac for our controller. If we create a pod with an invalid storage class can't we just let pod fail? |
545d5e3
to
29d6f1c
Compare
- This can be used to set the storageClassName used for the cache pvc - The field is immutable as the pvc field is also immutable - The field is not considered when checking if the image volume cache config has changed
29d6f1c
to
7187cf0
Compare
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.
This is awesome!
Does this need to be supported in v1alpha1 apis? #934 (comment) |
Let's think of the scenarios: converting v1alpha1 -> v1alpha2: converting v1alpha2 -> v1alpha1: My 2c is that if an old v1alpha1 client runs into an immutability error it will not lose data. If the storageClassName is unset in v1alpha2 behavior will not be affected by v1alpha1 clients. Users should upgrade kp. |
This seems rare but, not great. It essentially means we are not supporting v1alpha1.
If our strategy for v1alpha1 headaches is to say not use v1alpha1 we should probably just begin removing v1alpha1. |
risk seems very high
If we don't do this will we need to migrate all new fields to prevent data loss? ex |
We probably should provide support for these. Hitting an expected immutability constraint seems slightly worse to me. |
I think data loss is equal if not worse |
I think we should probably add migrations |
Do you think we should do that as this PR or create an issue to support it for all susceptible fields? |
…lients - Use annotations for conversion - v1alpha1 clients will be handled correctly
fe5d98d
to
425de88
Compare
I've added the conversion for this one here and have added #1036 |
Codecov Report
@@ Coverage Diff @@
## main #1029 +/- ##
==========================================
- Coverage 70.53% 70.47% -0.07%
==========================================
Files 122 122
Lines 5726 5740 +14
==========================================
+ Hits 4039 4045 +6
- Misses 1313 1319 +6
- Partials 374 376 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
will merge after 0.7.1 is released |