convert constant variable to function

This commit is contained in:
inovindasari
2024-11-27 15:34:03 +01:00
parent a2328b9ec8
commit a48b5b6fb6
13 changed files with 135 additions and 125 deletions
+1 -1
View File
@@ -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)
}