-
Notifications
You must be signed in to change notification settings - Fork 121
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
Proxy Protocol support for AWS ELB #516
base: master
Are you sure you want to change the base?
Conversation
Adds support for [Proxy Protocol Header](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html#proxy-protocol) support for `load_balancer` resource. Add `proxy_protocol` element to `load_balancer_options` configuration hash. For eg. proxy_protocol: { instance_ports: [80, 443] } This will create and add a policy `#{actual_elb.name}-proxy-protocol-policy` to selected Load Balancer and attach it to port 80, and 443. It looks only for existing listners with `instance_port` and removing backend server policy settings if necessary. Signed-off-by: Stanisław Tuszyński <[email protected]>
ff34b9e
to
7074184
Compare
Hey @stuszynski! Thanks for getting this PR setup. I have a few pieces of feedback but I think we can work on getting this merged. First, we definitely want to get tests added for this. Have you ever tried to run the tests locally? You can run the load balancer tests by (in the repo) running To be clear: do not do this any place it can corrupt actual data! I have a test account I use and I supply the profile name for that tester account with My other point of feedback is that we need this new attribute to be idempotent - it needs to be deleteable. Can you add logic so that if a recipe says
That isn't a fully idempotent attribute (it would be if it switched the policy to the correct ports like the With this logic and test coverage I think we can definitely get this merged. Thanks! |
Here is a patch file that takes a stab at the tests. They are failing right now because it looks like it is only attaching the policy to the first port? |
@tyler-ball Hi! Great thanks for a feedback. I'll look into this in my spare time. |
This PR adds a new option for
load_balancer
resource to enable a Proxy Protocol Header on desired ports.It requires a
proxy_protocol
item inload_balancer_options
configuration hash. For eg.This will create an
#{actual_elb.name}-proxy-protocol-policy
policy and attach it to a backend port 80, and 443. It looks only for existing listeners withinstance_port
and it removes backend server policy settings on any other ports if not listed.What do you think of it?