Do not create roles if cluster is masterless

fix pod deletion
This commit is contained in:
Murat Kabilov
2017-05-12 11:41:34 +02:00
parent da438aab3a
commit a7c57874d5
5 changed files with 59 additions and 42 deletions
+5 -1
View File
@@ -6,7 +6,11 @@ import (
"github.bus.zalan.do/acid/postgres-operator/pkg/util"
)
func (c *Cluster) SyncCluster() {
func (c *Cluster) SyncCluster(stopCh <-chan struct{}) {
if !c.podDispatcherRunning {
go c.podEventsDispatcher(stopCh)
}
c.logger.Debugf("Syncing Secrets")
if err := c.syncSecrets(); err != nil {
c.logger.Infof("Can't sync Secrets: %s", err)