feat: Support floating tag in product image selection - #1226
Conversation
|
A few points on the CRD change:
Comments on the implementations:
I updated the tests and the refactored the implementation to turn them green again (one is left as an exercise for the reader). I also added some explanatory comments. |
38ffa50 to
83531c7
Compare
Agreed. Like discussed, I now went with
Yes, I think I sufficiently touched on this in my updated doc comment.
I would say that this is implicitly covered by my current doc comment. It basically says, that a container/pod needs to restart in order to have an effect. All your comments on the implementation should be addressed in 83531c7. |
There was a problem hiding this comment.
I have to admin I prefer patchLevelFloatingTag as it makes it a bot more clear what the floatingTag is about.
Also we might want to have a different floating tag for some other functionality in the future (making things up: Only baseOS updates or product version bugfix bumps), in which case the abbreviated field name causes problems (which we don't have when we express what floating tag the user configures).
| product_version, | ||
| stackable_version, | ||
| product_version, | ||
| use_floating_tag, |
There was a problem hiding this comment.
Any reason for the re-ordering (also in other places)?
There was a problem hiding this comment.
No not really, other than my OCD 🙈
I can revert if needed.
There was a problem hiding this comment.
IIRC there even is a clippy lint that when constructing a struct you should use the order of the fields as it's defined in the struct.
That has product_version, stackable_version, use_floating_tag and repo, which I like :)
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
| automatically, e.g. `26.7.0` becomes `26.7` for the product image. | ||
| nullable: true | ||
| type: string | ||
| useFloatingTag: |
There was a problem hiding this comment.
Bumping this up so we don't forget
I have to admin I prefer
patchLevelFloatingTagas it makes it a bot more clear what the floatingTag is about.
Also we might want to have a different floating tag for some other functionality in the future (making things up: Only baseOS updates or product version bugfix bumps), in which case the abbreviated field name causes problems (which we don't have when we express what floating tag the user configures).
|
Bumping the bump as I suggest to rename it before voting:
|
I did not forgot about this, but personally I'm fine with the current name. I hope that others voting on this will prefer one or the other, otherwise it is 1 vs 1. |
|
@soenkeliebau mentioned that we might want to remove the term "floating tag" from the field name so that we don't explicitly mention the underlying mechanism (which could change down he line). I agree that it makes sense, but naming things is hard. A few alternative names might be:
|
Part of https://github.com/stackabletech/internal-issues/issues/169.
This PR adds support for auto updating product images. This is done by using a floating tag for product images instead of fully-qualified ones.
Significant changes are:
Add a new
useFloatingTagfield to the product image selection CRD interface:Remove the default of
pullPolicy. This better aligns with the floating tag feature, because if enabled, the pull policy is automatically set toAlways. The current default is (as far as I can see) a leftover from the past. Even the doc comment states thatAlwaysis the default, as we support floating tags (not true).The
stackableVersionfield is now a proper semantic version, instead of a plain string. This is needed, to correctly extract the floating tag if the auto update is enabled.This PR also serves as a decision. Please vote with 👍 or 👎 or leave comments.