Deploy service account for pod creation on demand

This commit is contained in:
Sergey Dudoladov
2018-04-18 16:20:20 +02:00
parent 88c68712b6
commit 214ae04aa7
4 changed files with 79 additions and 15 deletions
+5
View File
@@ -256,6 +256,11 @@ func (c *Cluster) Create() error {
}
c.logger.Infof("pod disruption budget %q has been successfully created", util.NameFromMeta(pdb.ObjectMeta))
if err = c.syncPodServiceAccounts(); err != nil {
return fmt.Errorf("could not sync pod service accounts: %v", err)
}
c.logger.Infof("pod service accounts have been successfully synced")
if c.Statefulset != nil {
return fmt.Errorf("statefulset already exists in the cluster")
}