Skip to content
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

Use more targeted NetworkPolicies #25

Conversation

indiebrain
Copy link

In #4, we added a NetworkPolicy. The intent was to prevent the Redis and/or Sentinel pods from differing RedisFailovers from joining up with one another (See: spotahome#550). These policies have proven to be too coarsely grained. We end up deploying supplemental NetworkPolicies to allow ingress traffic.

This change narrows the scope of the NetworkPolicies manged by the operator. One policy allows traffic to the Redis node pods ONLY on the redis port and monitoring port for traffic originating from within the namespace. The other policy allows traffic to the Sentinel pods ONLY on the sentinel port for traffic originating from within the namespace. All other traffic to these pods will be dropped.

Connections to the HAProxy pods - IE access to the redis master node - will now be allowed by default. This achieves the goals of #4 and allows us to stop littering additional NetworkPolicies to allow external communication with a Redis instance.

@indiebrain indiebrain self-assigned this Dec 13, 2023
@indiebrain indiebrain force-pushed the aaronk--separate-redis-and-sentinel-network-isolation-policies branch from 1c52915 to b95e366 Compare December 13, 2023 17:58
@indiebrain indiebrain changed the title Use more targetd NetworkPolicies Use more targeted NetworkPolicies Dec 13, 2023
@indiebrain indiebrain marked this pull request as ready for review December 13, 2023 18:58
@indiebrain indiebrain requested a review from a team as a code owner December 13, 2023 18:58
@indiebrain indiebrain force-pushed the aaronk--separate-redis-and-sentinel-network-isolation-policies branch from b95e366 to 92e05cb Compare December 13, 2023 23:03
@indiebrain indiebrain merged commit a971847 into master Dec 14, 2023
9 checks passed
@indiebrain indiebrain deleted the aaronk--separate-redis-and-sentinel-network-isolation-policies branch December 14, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants