# Mongos serviceAnnotations are ignored by Operator

**URL:** <https://forums.percona.com/t/mongos-serviceannotations-are-ignored-by-operator/12837>\
**Category:** Percona Operator for MongoDB\
**Created:** [November 2, 2021, 11:44am UTC](https://forums.percona.com/t/mongos-serviceannotations-are-ignored-by-operator/12837 "2021-11-02T11:44:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsaputro-expereo](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@nsaputro-expereo](https://forums.percona.com/u/nsaputro-expereo)\
**Post date:** [November 2, 2021, 11:44am UTC](https://forums.percona.com/t/mongos-serviceannotations-are-ignored-by-operator/12837/1 "2021-11-02T11:44:03Z")

</div>

Hi All,

Has anyone had a success with exposing mongos and configuring the service with **sharding.mongos.serviceAnnotations** option?

I have configured the mongos in our EKS with LoadBalancer option and configured the LB with annotation to make internal LB instead public facing one but it seems the annotations are ignored.

I tried editing the service annotation but it is keep updated (by operator) with a new service with empty annotation, only contains `percona.com/last-config-hash` entry.

It would be nice to add expose.enabled option to mongos similar to replicaset so we can set it to false and define the service ourselves outside the operator with necessary annotations.

Thank you.

Regards,  
Nugroho

---

<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:** [November 8, 2021, 8:50am UTC](https://forums.percona.com/t/mongos-serviceannotations-are-ignored-by-operator/12837/2 "2021-11-08T08:50:31Z")

</div>

Hello @nsaputro-expereo ,

seems our docs are wrong.  
It should be `sharding.mongos.expose.serviceAnnotations`.

It works for me on GKE. Could you please try it out?

Created a PR to fix the docs: [Update operator.rst by spron-in · Pull Request #805 · percona/percona-server-mongodb-operator · GitHub](https://github.com/percona/percona-server-mongodb-operator/pull/805)

---

<div class="post-metadata">

**Author:** ![nsaputro-expereo](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@nsaputro-expereo](https://forums.percona.com/u/nsaputro-expereo)\
**Post date:** [November 8, 2021, 9:25am UTC](https://forums.percona.com/t/mongos-serviceannotations-are-ignored-by-operator/12837/3 "2021-11-08T09:25:16Z")

</div>

@Sergey_Pronin Thank you. We use the helm chart so that means the chart needs to be fixed as well (both code and docs) as it uses **sharding.mongos.serviceAnnotations**

[percona-helm-charts/cluster.yaml at main · percona/percona-helm-charts (github.com)](https://github.com/percona/percona-helm-charts/blob/main/charts/psmdb-db/templates/cluster.yaml#L333)

---

<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:** [November 9, 2021, 7:59am UTC](https://forums.percona.com/t/mongos-serviceannotations-are-ignored-by-operator/12837/4 "2021-11-09T07:59:15Z")

</div>

You are right! I have created this JIRA issue to track this: [[K8SPSMDB-592] sharding exposure in helm has broken vars - Percona JIRA](https://jira.percona.com/browse/K8SPSMDB-592)
