mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-01 18:31:01 +02:00
convert constant variable to function
This commit is contained in:
@@ -108,7 +108,7 @@ func (c *Controller) attemptToMoveMasterPodsOffNode(node *v1.Node) error {
|
||||
podName := util.NameFromMeta(pod.ObjectMeta)
|
||||
|
||||
role, ok := pod.Labels[c.opConfig.PodRoleLabel]
|
||||
if !ok || cluster.PostgresRole(role) != cluster.Master {
|
||||
if !ok || cluster.PostgresRole(role) != cluster.PostgresRole(c.opConfig.PodLeaderLabelValue) {
|
||||
if !ok {
|
||||
c.logger.Warningf("could not move pod %q: pod has no role", podName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user