druid-io / druid-operator

Druid Kubernetes Operator
Other
205 stars 93 forks source link

Update all pods at the same time #302

Open cintoSunny opened 2 years ago

cintoSunny commented 2 years ago

Is there any way to perform an update action on all pods simultaneously?

We have a Druid running in Kubernetes as a stateful set where we want to update all the pods at the same time. We cannot seem to find a configuration for that. I am aware of rollingUpdate, which only updates one pod at a time.

We need this in case we want to prevent intermediate shuffling if the historicals come up one by one.

This is what we have currently

  updateStrategy:
    rollingUpdate:
      partition: 2
    type: RollingUpdate

Is there any other hack to get this done? Or is it something that the community is thinking about.

AdheipSingh commented 2 years ago

@cintoSunny if you keep rollingDeploy: false all update should happen in parallel, rollingDeploy shall call the objFullyDeployed() functions to make sure each sts/deploy updated is done full and then move to next one.

UpdateStrategy is the underlying statefulset properties.

cintoSunny commented 2 years ago

@AdheipSingh : I'll check it out. But, just to confirm, I want all the replicas in an sts to bounce at the same time. So, If I have a druid cluster with 5 historicals and 3 middle managers, I want all the 5 replicas/pods in historicals and 3 in middlemanager restarting simultaneously.