mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 07:51:24 +02:00
Move master/replica role names into the constants.
This commit is contained in:
committed by
Murat Kabilov
parent
176c6e8b19
commit
455f91128f
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user