Mongos serviceAnnotations are ignored by Operator

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

1 Like

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

1 Like

@spronin 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)

1 Like

You are right! I have created this JIRA issue to track this: [K8SPSMDB-592] sharding exposure in helm has broken vars - Percona JIRA

2 Likes