# PXC Operator Service Selector - Pod label mismatch

**URL:** https://forums.percona.com/t/pxc-operator-service-selector-pod-label-mismatch/20181
**Category:** Percona Operator for MySQL
**Tags:** community, mysql, percona
**Created:** [February 20, 2023, 9:08am UTC](https://forums.percona.com/t/pxc-operator-service-selector-pod-label-mismatch/20181 "2023-02-20T09:08:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SridharJ](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@SridharJ](https://forums.percona.com/u/SridharJ)
#### Post date: [February 20, 2023, 9:08am UTC](https://forums.percona.com/t/pxc-operator-service-selector-pod-label-mismatch/20181/1 "2023-02-20T09:08:11Z")

</div>

Hi,

We have a custom labels controller to mutate pod labels with custom labels, one of such labels is _pod-name_ which we set the dynamically generated pod name after the pod has spin up.  
The controller is applied to the namespace where the PXC Operator is run and the operator pod is mutated with such labels

The service resource of PXC operator seems to get all PXC pod labels in to the **service selector**

This behaviour leaves the service resource with _selector : pod-name with empty value_. This causes a mismatch between pod labels and service selector thereby causing operator to **lose endpoint** and becoming unavailable.

Is there an option to let the PXC Operator ignore setting all the pod labels into service selector ?

---

<div class="post-metadata">

### Author: ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)
#### Post date: [February 20, 2023, 10:14am UTC](https://forums.percona.com/t/pxc-operator-service-selector-pod-label-mismatch/20181/2 "2023-02-20T10:14:59Z")

</div>

Hey @SridharJ ,

which version of the operator are you running?

In the version 1.12 we added ignoreLabels for the Service objects:

> **[Labels and annotations - Percona Operator for MySQL based on Percona XtraDB...](https://docs.percona.com/percona-operator-for-mysql/pxc/annotations.html#setting-labels-and-annotations-in-the-custom-resource)**
>
> Documentation

Can you check if it helps?

---

<div class="post-metadata">

### Author: ![SridharJ](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@SridharJ](https://forums.percona.com/u/SridharJ)
#### Post date: [February 22, 2023, 7:55am UTC](https://forums.percona.com/t/pxc-operator-service-selector-pod-label-mismatch/20181/3 "2023-02-22T07:55:19Z")

</div>

Hi @Sergey_Pronin

We use PXC Operator v1.10.0

I see the new change of ingoreLabels for service objects applies to PerconaXtraDBCluster CR.  
But the issue i see is with the operator pod and service itself.  
Does it apply here as well ?

> <https://github.com/percona/percona-xtradb-cluster-operator/blob/v1.12.0/deploy/cw-operator.yaml#L8>
