Keep Source IP

You can preserve client source IP by setting annotation ingress.appscode.com/keep-source-ip to true.

For LoadBalancer type ingresses, the actual configuration generated depends on the underlying cloud provider.

  • GCE, GKE, Azure, ACS: Sets ExternalTrafficPolicy to Local for services used to expose HAProxy. See here.
  • AWS: Enables accept-proxy that enforces the use of the PROXY protocol over any connection accepted by any of the sockets declared on the same line.

For NodePort type ingresses, it sets ExternalTrafficPolicy to Local regardless the cloud provider.

Ingress Example

apiVersion: voyager.appscode.com/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  namespace: default
  annotations:
    ingress.appscode.com/keep-source-ip: "true"
spec:
  rules:
  - host: voyager.appscode.test
    http:
      paths:
      - path: /foo
        backend:
          serviceName: test-server
          servicePort: 80

Take your team where it needs to go.

Create your cluster in minutes. Our team is here to help and would be happy to chat with you.