-
Notifications
You must be signed in to change notification settings - Fork 48
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
cli: add upgrade-check command #1109
Conversation
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.
Not a real review, just some thoughts after going over the changes
4f59e9d
to
5dc4d43
Compare
// currently supported versions. | ||
//nolint:revive | ||
V1_24 ValidK8sVersion = "1.24" | ||
V1_24 ValidK8sVersion = "v1.24.9" | ||
//nolint:revive | ||
V1_25 ValidK8sVersion = "1.25" | ||
V1_25 ValidK8sVersion = "v1.25.6" | ||
//nolint:revive | ||
V1_26 ValidK8sVersion = "1.26" | ||
V1_26 ValidK8sVersion = "v1.26.1" | ||
|
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.
Checked our code again, if I understand it correctly the V1_X ValidK8sVersion
variables are only used to keep track of the minor Kubernetes version supported by Constellation (We don't support choosing patch versions).
I think we should keep them as only Major.Minor, not sure about the v
prefix.
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.
The reason for switching to exposing the patch version is that we might want to offer a patch-version upgrade to the user. I think its cleaner to show users that the version will change from e.g. 1.25.6
to 1.25.7
instead of doing this implicitly. Users will still not be able to chose arbitrary patch versions, but it will be obvious which one is running/upgraded.
Version validation checks that the configured versions are not more than one minor version below the CLI's version. The validation can be disabled using --force. This is necessary for now during development as the CLI does not have a prerelease version, as our images do.
88a5ef4
to
97f2817
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.
Nice work!
Upgrade check is used to find updates for the current cluster. Optionally the found upgrades can be persisted to the config for consumption by the upgrade-execute cmd. The old `upgrade execute` in this commit does not work with the new `upgrade plan`. The current versions are read from the cluster. Supported versions are read from the cli and the versionsapi. Adds a new config field MicroserviceVersion that will be used by `upgrade execute` to update the service versions. The field is optional until 2.7 A deprecation warning for the upgrade key is printed during config validation. Kubernetes versions now specify the patch version to make it explicit for users if an upgrade changes the k8s version.
9191219
to
b0cd065
Compare
Proposed change(s)
constellation upgrade check
as a command and removeconstellation upgrade plan
. Upgrade check shows the smallest upgrade a user could do to the current cluster with their current CLI. Smallest since we have to make some decision on which upgrade to show in order to support the--write-config
flag. We could add a--all
flag to show all possible upgrades.--write-config
flag can be used to persist the suggested update into the config.--ref
and--stream
flag to select the ref and stream which should be checked for image upgrades.--force
flag that disables config validation.MicroserviceVersion
. This specifies the version of theconstellation-services
chart and (implicitly) the version of theconstellation-operators
chart. I decided to make the operator version implicit as we would otherwise have to have another config value for it. We could think about unifying the operators and services charts. I don't think there is a technical reason for keeping them separate.Checklist