feat: enable support for proxy protocol on status port#55986
feat: enable support for proxy protocol on status port#55986istio-testing merged 1 commit intoistio:masterfrom
Conversation
|
😊 Welcome @yann-soubeyrand! This is either your first contribution to the Istio istio repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
|
Hi @yann-soubeyrand. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
The downside of always enabling is that we now run this listener filter for every single request that comes through, regardless of if it's proxy protocol or not...I would feel more comfortable if there was an option in proxyconfig that allowed configuring this just for proxies that needed it |
|
Are there a lot of requests on the status port? Is it possible to modify the bootstrap configuration using ProxyConfig? |
|
if this belong to AWS only, this should be guarded by a feature flag(or detect by platform) to make less noise to other users. |
|
I’m not sure this concerns AWS only, this is just the example that I’m aware of, but I guess there are other use cases. |
I never hear this before, so prefer this behind a flag. |
63e9cf6 to
4345183
Compare
|
🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test? Courtesy of your friendly test nag. |
|
@zirain I modified the PR, is it the modification that you had in mind? |
|
/ok-to-test |
| "name": "envoy.listener.proxy_protocol", | ||
| "typed_config": { | ||
| "@type": "type.googleapis.com/envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol", | ||
| "allow_requests_without_proxy_protocol": true, |
There was a problem hiding this comment.
is this still needed now?
There was a problem hiding this comment.
The "allow_requests_without_proxy_protocol": true part you mean? I think so, because the Kubernetes probes won’t use proxy protocol I guess.
There was a problem hiding this comment.
I was wondering if we can have multiple filter chain matches that distinguishes health check call from AWS NLB vs K8s and this filter accoridingly
There was a problem hiding this comment.
I don't think it's possible, since the proxy protocol filter is a listener filter, or is it? Do you prefer that we add another dedicated status listener with proxy protocol support, for example on port 15022?
There was a problem hiding this comment.
I think how its written is good we can just make this opt-in
There was a problem hiding this comment.
Oh which you already did. LGTM then personally
There was a problem hiding this comment.
Oh. Sorry. This is listener filter. You can not do what I suggested and do not think adding another port is needed. I am good with this
4345183 to
73669c4
Compare
73669c4 to
e879337
Compare
e879337 to
38b8e74
Compare
On AWS network load balancers, when enabling proxy protocol and configuring health check to query Istio status port on the path /healthz/ready, the health check fails, because Istio status port does not support proxy protocol. However, on the load balancer, proxy protocol cannot be disabled for the health check only. Envoy supports the proxy protocol with an option to allow requests without proxy protocol. This option breaks conformance to the proxy protocol specification, and should only be enabled when the traffic to the listener comes from a trusted source, which should be the case for the status port. This seems to be a good compromise to allow both requests with and without proxy protocol on the status port. Fixes istio#39868
38b8e74 to
e4a8673
Compare
|
@yann-soubeyrand: The following test failed, say
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/test integ-pilot-multicluster |
|
Thanks everyone for your feedback helping this PR go its way to the merge! |
* upstream/master: (28 commits) Automator: update common-files@master in istio/istio@master (istio#56545) Automator: update proxy@master in istio/istio@master (istio#56544) Automator: update go-control-plane in istio/istio@master (istio#56543) Automator: update proxy@master in istio/istio@master (istio#56540) Automator: update ztunnel@master in istio/istio@master (istio#56532) Ambient: In ambient index, filter configs by revision (istio#56477) Automator: update istio/client-go@master dependency in istio/istio@master (istio#56539) Automator: update proxy@master in istio/istio@master (istio#56538) Automator: update common-files@master in istio/istio@master (istio#56537) optimization: allow for lazy sidecar initialization (istio#47221) static collection eager indexes (istio#56530) fix typo in flag (istio#56534) feat: enable support for proxy protocol on status port (istio#55986) remove finding of pods by IP (istio#56502) Automator: update proxy@master in istio/istio@master (istio#56528) migrate file monitor to krt (istio#55970) Automator: update istio/client-go@master dependency in istio/istio@master (istio#56525) Automator: update ztunnel@master in istio/istio@master (istio#56518) Fix crash in merging http routes (istio#56499) krt: add assertions (istio#56510) ...
|
@yann-soubeyrand You're my hero today, thank you. |
Please provide a description of this PR:
On AWS network load balancers, when enabling proxy protocol and configuring health check to query Istio status port on the path /healthz/ready, the health check fails, because Istio status port does not support proxy protocol. However, on the load balancer, proxy protocol cannot be disabled for the health check only.
Envoy supports the proxy protocol with an option to allow requests without proxy protocol. This option breaks conformance to the proxy protocol specification, and should only be enabled when the traffic to the listener comes from a trusted source, which should be the case for the status port. This seems to be a good compromise to allow both requests with and without proxy protocol on the status port.
Fixes #39868
This PR is meant to open a discussion. I’d need help to write some tests if it has a chance of being accepted.