Move master/replica role names into the constants.

This commit is contained in:
Oleksii Kliukin
2017-05-12 11:41:32 +02:00
committed by Murat Kabilov
parent 176c6e8b19
commit 455f91128f
4 changed files with 9 additions and 5 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"github.bus.zalan.do/acid/postgres-operator/pkg/spec"
"github.bus.zalan.do/acid/postgres-operator/pkg/util"
"github.bus.zalan.do/acid/postgres-operator/pkg/util/constants"
)
func (c *Cluster) SyncCluster() {
@@ -173,7 +174,7 @@ func (c *Cluster) syncPods() error {
c.logPodChanges(&pod, curSs, reason)
}
if util.PodSpiloRole(&pod) == "master" {
if util.PodSpiloRole(&pod) == constants.PodRoleMaster {
//TODO: do manual failover first
}
err = c.recreatePod(pod)