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

Keepalived Operator with Ingress breaks ip whitelist annotation #77

Open
jocelynthode opened this issue Sep 6, 2021 · 3 comments
Open

Comments

@jocelynthode
Copy link

Hi,

I tried setting up the keepalived operator together with the default IngressController. Unfortunately I noticed that since the IPs are set as an externalIp on a service source IP received by the default IngressController (HAProxy in OKD 4.7) will only receive the loadbalancer IP instead of a potential external source, which breaks the ip whitelist annotation.

For now I had to completely drop the keepalived Operator and I use a NodePort configuration to bypass the issue.

Is there something I missed with my configuration? Otherwise I think we could add a disclaimer in the how-to-ingress.md to state this point.

@raffaelespazzoli
Copy link
Collaborator

I did not understand the issue. Can you try to explain it in a different way?

@jocelynthode
Copy link
Author

Yes, OKD Routes support an IP whitelist annotation. In this annotation you can specifiy which CIDR can access this route. This creates a simple ACL in the HAProxy configuration to deny anyone not having an IP in the CIDR.

This mechanism relies on the fact that HAProxy can see the SRC IP from the end user to determine whether this IP is allowed. When having using a Keepalived VIP to loadbalance external traffic to the Ingress (HAProxy) the SRC IP always appear as a cluster internal IP due to the fact that the VIP is an external IP on a loadbalancer service.

I'm not familiar enough with the internal working of the Kubernetes service loadbalancer part but it seems we see the service loadbalancer IP instead of the end user ip. This renders ip whitelisting unusable.

@raffaelespazzoli
Copy link
Collaborator

raffaelespazzoli commented Sep 29, 2021 via email

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

No branches or pull requests

2 participants