Added proxy protocol support settings#922
Conversation
|
@AlinsRan could you please review this? I'm using it on the production setup - and it proofs the concept. |
charts/apisix/values.yaml
Outdated
| # - name: prometheus-metrics | ||
| # size: 20m | ||
|
|
||
| proxy_protocol: |
There was a problem hiding this comment.
please use lowerCamelCase
| {{- if .Values.service.http.enabled }} | ||
| - name: apisix-gateway | ||
| port: {{ .Values.service.http.servicePort }} | ||
| {{- if .Values.apisix.proxy_protocol.enabled }} |
There was a problem hiding this comment.
It does not conflict with HTTP or HTTPS, why do we need to share a port?It does not conflict with HTTP or HTTPS, we should add a new service.port.
There was a problem hiding this comment.
Yes, it doesn't conflict. But when you enable proxy protocol on the network load balancer in front of the apache apisix (I'm using Oracle cloud) https://docs.nginx.com/nginx/admin-guide/load-balancer/using-proxy-protocol/
From the documentation of the network load balancer:
"For TCP applications using PROXY protocol v2, NLB adds a PROXY protocol v2 header to each inbound TCP connection."
So if you enable ppv2 on the nlb but your upstream (apisix) cannot accept ppv2 header in the tcp - then it will be rejected. That why we need to change default port on the service that exposes gateway to ports that support ppv2 tcp header.
There was a problem hiding this comment.
I don't know why, but apache apisix won't let you setup proxy protocol port on the same port as node (80/443).
That why I added if statement.
|
There are already two PR open for this same objective: Would be nice to have any of them merged. It is extremely important for cloud deployments (AWS, GCP, Azure...) in which APISIX runs behind a L4 load balancer. Bumping for visibility. |
|
@AlinsRan any plans on having any of those PRs merged any time soon? |
Hello again. After syncing my fork with an upcoming changes - I merged my local changes to enable support of the proxy protocol v2 settings on the Apache APISIX.
I tested it on my installation and it works fine. It is listed in the reference: https://docs.api7.ai/apisix/networking/port-reference/