File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ func (s *StatefulSetSyncer) updatePod(ctx context.Context) error {
323323 return fmt .Errorf ("can't start/continue 'update': pod[%s] is unhealthy" , pod .Name )
324324 }
325325 // Skip if pod is leader.
326- if pod .ObjectMeta .Labels ["role" ] == "leader" && leaderPod .Name == "" {
326+ if pod .ObjectMeta .Labels ["role" ] == string ( utils . Leader ) && leaderPod .Name == "" {
327327 leaderPod = pod
328328 continue
329329 }
@@ -355,7 +355,7 @@ func (s *StatefulSetSyncer) mutate() error {
355355 for k , v := range s .Spec .PodPolicy .Labels {
356356 s .sfs .Spec .Template .ObjectMeta .Labels [k ] = v
357357 }
358- s .sfs .Spec .Template .ObjectMeta .Labels ["role" ] = "candidate"
358+ s .sfs .Spec .Template .ObjectMeta .Labels ["role" ] = string ( utils . Candidate )
359359 s .sfs .Spec .Template .ObjectMeta .Labels ["healthy" ] = "no"
360360
361361 s .sfs .Spec .Template .Annotations = s .Spec .PodPolicy .Annotations
You can’t perform that action at this time.
0 commit comments