Upgrade cluster applications, starting with runner
What does this MR do?
- Adds ability to upgrade cluster applications
Re-uses the same services used to install a cluster application to also upgrade a cluster application. This is possible as helm allows installation and upgrade to both use helm upgrade --install
.
This allows for the following new transitions:
- a successful upgrade:
installed
->scheduled
->updating
->installed
updated
- a failed upgrade:
installed
->scheduled
->updating
->update_errored
.
cf. successful installation is installable
-> scheduled
-> installing
-> installed
.
- Allow in the Frontend to upgrade the runner application
Other changes:
- Changes
InstallCommand
to usehelm upgrade --install
. - Adds
Clusters::Application::UpgradeService
where the state transition needed to bescheduled -> updating
.
What are the relevant issue numbers?
- https://gitlab.com/gitlab-org/gitlab-ce/issues/49384
- https://gitlab.com/gitlab-org/gitlab-ce/issues/56524
Tasks
-
Only allow upgrades ifversion != VERSION
? - [-]
Show what version was attempted in error message ? -
Test new transitions -
Update version
column after update complete - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24810
Manual QA test
-
Install runner -
Upgrade runner via UI (re-enabled Install button via Chrome Dev tools and hit button) -
Upgrade runner via rails console - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24789#note_136426318 -
Check Prometheus alerts still works - https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9483#note_139063962
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [-] Documentation created/updated via this MR
- [-] Documentation reviewed by technical writer or follow-up review issue created
-
Tests added for this feature/bug - [-] Tested in all supported browsers
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides - [-] Conforms to the database guides
- [-] Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
-
Security reports checked/validated by reviewer
Edited by 🤖 GitLab Bot 🤖