Can't use nginx ingress whitelist

Dear gitlab community.
I have a service running in kubernetes, deployed via gitlab, which i only want to be available in an internal network.
So i thought, that whitelisting the ip range would be a good idea and i used the annotation nginx.ingress.kubernetes.io/whitelist-source-range. But what now happened is, that i can’t access the service from anywhere.
Looking at the logs of the ingress controller revealed, that the apparent remote ip for all http requests is an internal ip of the kubernetes node on which the ingress pod is running.
Has anyone any idea, why this may be happening?

Edit: By now i have an idea what happens: nginx-ingress receives its ip from metalLB, as the externalTrafficPolicy for the ingress controller service is set to Cluster, all packets appear to be from the master node. I will try patching the configuration of the service to Local.

Patching the service worked:

kubectl -n gitlab-managed-apps patch svc ingress-nginx-ingress-controller -p '{"spec":{"externalTrafficPolicy":"Local"}}'