-
Notifications
You must be signed in to change notification settings - Fork 136
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
[BUG] Open relay again with hostPort #137
Comments
I don't think this is a good idea. With hostNetwork you expose your whole pods, potentially introducing more issues (e.g. front pod has several ports for internal use only). If flanel does not preserve the source IP, it's seriously broken (seems so, check kubernetes/kubernetes#29742). I'd recommend to use either a different CNI or to install some LoadBalancer (like MetalLB) that allows to expose the services in a correct way. |
@micw this is why I suggested splitting the front into two parts, one that we can expose and the other that is hidden. |
Sorry, I was reading this only half-ways. Splitting would exactly solve what I wrote in the 1st paragraph. Nevertheless, I'm still not convinced to implement this as a workaround. I digged a bit deeper. Seems that "hostPort" is independent of the CNI you use and it's a general issue. But I wonder when this occurs. I have set up countless k8s systems using hostPort in the last years and had such an issue only once (messed up firewall rules after cluster upgrade that were fixed after a reboot). If hostPort is really broken on current K8S, we need to re-think the whole concept of exposing ports without an LB. Edit: just an idea. If you run on a recent system, there's probably NFTables installed by default which is not compatible with K8S and can also cause such issues. Can you verify that you switched to iptables? |
It really seems to be the case, these issues appear and deseappear on each upgrade. This is why I think hostNetwork would be a better fit when a loadBalancer is not available.
|
@micw the preserving of source IP seems to be unspecified behavior, I really think we should switch to hostNetwrok for what is exposed externally, and split with other half. what do you think ? |
Describe the bug
When using flannel as CNI (after my last upgrade), it seemed to handle hostPort with NAT, meaning that source IP is changed. This is not the case when using hostNetwok as it doesn't go through CNI.
I would be willing to add a hostNetwork mode to the chart, but I don't have enough knowledge on how the components work. The main constraint for using hostNetwork IMO is that the ports are currently not marked as hostPorts.
maybe we could split the front into two parts:
Would anyone in the mailu team be willing to discuss this with me and I make the implementation.
Thanks in advance.
Environment
The text was updated successfully, but these errors were encountered: