-
Notifications
You must be signed in to change notification settings - Fork 28
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
callerIpAddress only ever shows the pod IP of the self hosted gateway #273
Comments
Hey, would you mind trying with SHGW v2.5.0 please? |
I updated to v2.5.0 but that did not change the behavior. I did some additional testing and realized this is issue we have encountered is due to our use of Linkerd service mesh. If I run the SHGW without the service mesh then |
We can close this issue and I will follow up with the Linkerd folks. If I find a solution, I will update this issue with a solution. |
No worries and thanks for letting me know! |
Turns out this was simpler than expected. When using Linkerd with the self hosted gateway, just add the following annotation for your deployment or namespace |
Thanks for sharing! |
Report
We are trying to capture the client IP of the requester in the self hosted gateway logs and expected the log field
callerIpAddress
to contain the client IP. We have tested this both with a LoadBalancer (MetalLB) and NodePort service. Both services were configured withexternalTrafficPolicy: Local
. In our case, the IP is always the IP of the self hosted gateway Pod. The only other case where thecallerIpAddress
was different was when wekubectl port-forward...
to the service. ThecallerIpAddress
when testing via port-forward is127.0.0.1
.Expected Behavior
I was expecting the
callerIpAddress
to be the actual IP of the client making the request (especially whenexternalTrafficPolicy: Local
).Actual Behavior
callerIpAddress
log field only ever shows the pod IP of the self hosted gateway.Steps to Reproduce the Problem
externalTrafficPolicy: Local
.Logs from self-hosted gateway
Self-hosted Gateway Version
2.4.0
Deployment
Self-Managed (YAML/Helm)
Platform
Other
Kubernetes Version
1.24
Anything else?
On prem Kubernetes.
The text was updated successfully, but these errors were encountered: