mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 21:13:31 +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) listPods() ([]v1.Pod, error) {
|
||||
@@ -179,7 +180,7 @@ func (c *Cluster) recreatePods() error {
|
||||
continue
|
||||
}
|
||||
|
||||
if role == "master" {
|
||||
if role == constants.PodRoleMaster {
|
||||
masterPod = pod
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user