mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 08:31:54 +02:00
Fix Pod Disruption Budget null pointer exception
This commit is contained in:
@@ -278,6 +278,11 @@ func (c *Cluster) syncVolumes() error {
|
||||
}
|
||||
|
||||
func (c *Cluster) samePDBWith(pdb *policybeta1.PodDisruptionBudget) (match bool, reason string) {
|
||||
if c.PodDisruptionBudget == nil {
|
||||
match = false
|
||||
reason = "pdb does not exist"
|
||||
return
|
||||
}
|
||||
match = reflect.DeepEqual(pdb.Spec, c.PodDisruptionBudget.Spec)
|
||||
if !match {
|
||||
reason = "new service spec doesn't match the current one"
|
||||
|
||||
Reference in New Issue
Block a user