-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ExternalTrafficPolicy for different service types #1673
base: main
Are you sure you want to change the base?
Conversation
Hi @clsv, maybe having these settings flexible is a better idea. Users will be able to change them for their needs. Like, users will be able to change it via CR https://github.com/percona/percona-server-mongodb-operator/blob/main/deploy/cr.yaml#L227 because now it is impossible. |
Hi @hors, i encountered this issue yesterday in version 1.17.0, and I had to create a deployment with a kubectl patch for services of type NodePort. While I agree that having flexible settings is a good idea, I still believe it would be preferable to have more expected default behavior. When I request a LoadBalancer, I would expect that only the nodes running MongoDB would respond to external traffic. |
commit: 799f0ca |
Problem:
The ExternalTrafficPolicy for services of type LoadBalancer and NodePort was incorrectly set. For LoadBalancer services, the policy should be Local to ensure external connections reach the node where the service is running. However, it was incorrectly set to Cluster. Similarly, NodePort services had ExternalTrafficPolicy set to Local, when it should be Cluster for proper internal routing.
Cause:
The wrong ExternalTrafficPolicy was applied for NodePort and LoadBalancer services, causing inefficient routing for external traffic.
Solution:
The ExternalTrafficPolicy for NodePort services has been updated to Cluster, and for LoadBalancer services to Local, ensuring proper traffic flow for both service types.