Labeling on HaProxy Service in Percona Operator


During MySQL instance deployment from Percona MySql Operator, i noticed something like below -

kubectl describe svc mysql-1314-pxc-db-haproxy -n ns1
Name:                     mysql-1314-pxc-db-haproxy
Namespace:                ns1

In my requirement, i need to put some extra label on Haproxy Svc so if i try to label them by some kubectl command then those labels would not persist.
Any idea, how we can put some more labels on these SVC permanently ?


1 Like

Hi @cmg1986 ,

We know about it and we have added improvement to our operator. Starting from 1.11.0 you will have possibility to add labels on haproxy services.

Please see [K8SPXC-738] Labels are not applied to Service - Percona JIRA

1 Like

So as of now, whats fix… as there is no service getting deployed through deploy/cr.yaml then how can we update label for this haproxy svc ?

1 Like

@cmg1986 You will need just to add label into CR e.g. percona-xtradb-cluster-operator/cr.yaml at main · percona/percona-xtradb-cluster-operator · GitHub for HaProxy service and apply it. The services will be updated.

P.S. The code was merged into main branch and you can test it but please note it is not production ready. If you want to use it in production you need to wait for release.

1 Like