-
Notifications
You must be signed in to change notification settings - Fork 30
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 config option to set maximum Istio version #507
Conversation
1e29861
to
e74df6c
Compare
nevermind this is about |
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.
Hmm, this approach won't work, because spec.version
is currently not really an actual version number. It's just a string (for example, when spec.version: latest
, latest
is just the name, whereas the actual version number is whatever is set in the version
field in versions.yaml). But the operator currently doesn't even read the versions.yaml file.
The operator currently doesn't really know anything about versions. It simply takes the spec.version
string and uses it to construct the path for the chart it must render.
We either need to remove the version names from versions.yaml and just use the version number as the version name (but this prevents us from using "latest" as the version name), or we make the operator read the versions.yaml file, allowing it to map the version name to the version number.
return reconciler.NewValidationError("spec.version is not a valid semver: " + err.Error()) | ||
} | ||
if config.Config.MaximumIstioVersion != nil && istioVersion.GreaterThan(config.Config.MaximumIstioVersion) { | ||
return reconciler.NewValidationError("spec.version is not supported") |
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.
Can you add the version to the error message. This makes it read as though setting the field itself is not supported.
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.
done!
Actually, we could get rid of the version names by simply defaulting an empty |
e74df6c
to
b8b1cb6
Compare
I think this is good and we should do it as part of implementing version aliases. For this specific instance, we just need to be able have an upper limit on the version, so IMO it would be a bit overkill to implement this (and then revise it anyway when implementing version aliases). |
Signed-off-by: Daniel Grimm <[email protected]>
b8b1cb6
to
8cb2baf
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #507 +/- ##
==========================================
+ Coverage 78.21% 78.50% +0.29%
==========================================
Files 38 38
Lines 2272 2294 +22
==========================================
+ Hits 1777 1801 +24
+ Misses 404 403 -1
+ Partials 91 90 -1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Daniel Grimm <[email protected]>
Closing this as per our discussion. We'll use a normal branching strategy and re-evaluate after a few minor releases |
No description provided.