Details
-
Technical task
-
Status: Done
-
Medium
-
Resolution: Fixed
-
None
-
None
-
None
-
5
-
Yes
-
Yes
-
Yes
-
Server Integrations
Description
User story
After user notification about available operator update is done, we should be able to execute this update.
UI/UX
- button to execute the update
- reload of k8s cluster list on successful update to see the new version installed
Suggested implementation
remove hard coded CR & API version -> move it to pmm-managed's database, create db cluster rpc with the version stored. Operator version will get stored for the fist time after k8s cluster registration as part of the rpc that registrates the k8s cluster.Nope, we fetch the version from the kubernetes cluster to not to store it in two places.- fetch bundle.yaml of the operator version from github and apply it - Done
change the operator version installed stored in pmm-managed when update is appliedWe don't need that, see first point- don't forget to change tests that depend on version - DONE
- also default database image should be stored in pmm-managed because it can change with operator update. We use the hardcoded constant for database docker image in dbaas-controller now. Maybe we can use default version from version management feature, build the image string from it. - DONE
- can we handle a state when support for
disabled/default db version is removed from operator?We should remove unsupported disabled ones- DONE, we don't have to delete disabled usupported versions to make things work. - ADD A FLAG TO BE ABLE TO SPECIFY URL FOR FETCHING YAML MANIFESTS -> USER DON'T NEED TO HAVE ACCESS TO GITHUB. USER CAN THEN CREATE OWN SERVICE THAT WILL SERVE MANIFESTS. - DONE
In context of API/request
- FE <msg: version to update to is x.x.x> -> /v1/TBD pmm-managed -> dbaas-controller <manifests> ->k8s.
- FE <- <operator updated> pmm-managed <- dbaas-controller.
- pmm-managed should check compatibility again in version service so we don't update to incompatible operator or to the operator version that does not exist in version service. For example from the branch an attacker creates as part of PR because we are fetching bundle.yaml from github - DONE
pmm-managed calls dbaas-controller rpc, on success stores version of operatora new default DB version is a new recommended version if old default is not supported. - DONE- dbaas-controller does the bundle fetching, applying, we should not wait for the new operator to be ready - the same behavior as operators installation on k8s cluster registration. - DONE
Out of the scope
- Rollback if update fails, or if something is not working well in management of db clusters
- Checking if more up to date operators are already installed in the cluster on operator cluster installation.
- Taking into account we are running custom build of operator.
Attachments
Issue Links
- is blocked by
-
PMM-7722 DBaaS: Announce new supported version of operator
-
- Done
-