-
Bug
-
Resolution: Done
-
Medium
-
Honolulu Release
-
None
Description:
Deployment strategy type for cps-postgres-primary and cps-postgres-replica is Rolling Update.
When updating the deployment, this strategy implies starting a new replica of the deployment before the running one is terminated (max unavailable 0 and max surge 1)
This situation can lead to following issues:
- Not able to complete the update because of Multi-Attach error and Mounting Failure if underlying storage does not allow to mount the same volume to 2 different pods at the same time (blocks the update on Bell env).
- Data corruption if the same volume is successfully mounted to the 2 db replicas pod at the same time (theoretical ?)
Expected behaviour:
Rolling Update strategy should not be used for db deployment workloads. The strategy should be Recreate.
Additional note:
Recreate strategy only applies to upgrades. In case of manual pod deletion, the replacement is created immediately. StatefulSet should be considered for "at most" guarantee.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy