pre-upgrade helm hook for statefulset deletes all replicas simultaneously

Viewed 22

i have 3 statefulsets

A sts with 3 replicas --> only install ( first prioriy)
B sts with 2 replicas --> install (second prioriy) and upgrade ( first prioriy)
C sts with 3 replicas --> install (third priority) and upgrade ( second prioriy)

i have set podManagementPolicy as Parallel which is necessary.

B has initContainer to wait for the A to come up
C has initContainer to wait for the B to come up

A sts has hook

"helm.sh/hook": pre-install
"helm.sh/hook-weight": "-10"  

B sts has hook

"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "-5"  

C sts has hook

"helm.sh/hook": pre-upgrade
"helm.sh/hook-weight": "10"  

when i do helm upgrade,
B sts upgrades first but, its started to terminate both replicas simultaneously(which violates rollingUpgrade)

can anyone help , how to solve this issue.

0 Answers
Related