dragonflydb / dragonfly-operator

A Kubernetes operator to install and manage Dragonfly instances.
https://www.dragonflydb.io/docs/managing-dragonfly/operator/installation
Apache License 2.0
144 stars 34 forks source link

feat(upgrade): Use repltakeover #109

Closed Pothulapati closed 1 year ago

Pothulapati commented 1 year ago

Instead of deleting the master, This PR updates the rollout flow to run repltakeover on a latest replica which would mark this pod as the master while terminating the old master. When a pod is terminated, Kubernetes automatically recreates it and the pod lifecycle controller will do the needful.

The pod lifecycle controller does react on various instances and tries to corrupt, but we only expect it to handle new pod creations and hence toggle is added to not react on isRollingUpdate=true for other events.