mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-07 07:13:09 +02:00
Fix Pod Disruption Budget null pointer exception
This commit is contained in:
@@ -231,6 +231,12 @@ func (c *Cluster) Create() error {
|
||||
}
|
||||
c.logger.Infof("secrets have been successfully created")
|
||||
|
||||
pdb, err := c.createPodDisruptionBudget()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create pod disruption budget: %v", err)
|
||||
}
|
||||
c.logger.Infof("pod disruption budget %q has been successfully created", util.NameFromMeta(pdb.ObjectMeta))
|
||||
|
||||
ss, err = c.createStatefulSet()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create statefulset: %v", err)
|
||||
@@ -261,12 +267,6 @@ func (c *Cluster) Create() error {
|
||||
}
|
||||
}
|
||||
|
||||
pdb, err := c.createPodDisruptionBudget()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create pod disruption budget: %v", err)
|
||||
}
|
||||
c.logger.Infof("pod disruption budget %q has been successfully created", util.NameFromMeta(pdb.ObjectMeta))
|
||||
|
||||
err = c.listResources()
|
||||
if err != nil {
|
||||
c.logger.Errorf("could not list resources: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user