Primary/replica labels on pods

Greetings,

I noticed that the orchestration ‘handler’ in this operator will set a primary=true label during failover operations. Here’s the relevant code.

For our implementation of this operator, we’re interested in bypassing haproxy/router in favor of our own routing system which can target pods based on their labels. To achieve this goal, does it make sense to label primaries and replicas during pod bootstrapping? Will that interfere with any expectations of the operator?

Hey Joshua,

but if you set labels during bootstraping only, how would they be set in the case of failover?

But maybe I’m missing something and need @Ege_Gunes and @Slava_Sarzhan input.

The labels appear to get set at failover time, but not at boot.