Skip to content

Commit

Permalink
fix k8s object creation order
Browse files Browse the repository at this point in the history
  • Loading branch information
mkabilov committed Oct 19, 2017
1 parent 8f4cea6 commit b959cc3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b959cc3

Please sign in to comment.