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) listPods() ([]v1.Pod, error) {
@@ -179,7 +180,7 @@ func (c *Cluster) recreatePods() error {
continue
}
if role == "master" {
if role == constants.PodRoleMaster {
masterPod = pod
continue
}