-
Notifications
You must be signed in to change notification settings - Fork 267
Added proxy protocol support settings #922
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
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlinsRan the case is fixed)
|
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. |
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/