Skip to content

fix(nginx): Enable builder PROXY PROTOCOL support#263

Merged
mboersma merged 1 commit intodeis:masterfrom
felixbuenemann:fix-builder-proxy-protocol-support
Sep 27, 2016
Merged

fix(nginx): Enable builder PROXY PROTOCOL support#263
mboersma merged 1 commit intodeis:masterfrom
felixbuenemann:fix-builder-proxy-protocol-support

Conversation

@felixbuenemann
Copy link
Copy Markdown
Contributor

@felixbuenemann felixbuenemann commented Sep 27, 2016

If proxy protocol is enabled on an AWS ELB in kubernetes using the
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'
annotation on the load balancer service, it will enable PROXY PROTOCOL
on all ports forwarded by the ELB, which means the builder proxy on port
2222 also needs to use proxy_protocol on its listen directive.

There is currently no way to configure PROXY PROTOCOL per port on AWS
using kubenetes service annotation and it doesn't really make sense to
enable proxy protocol only for port 80 and 443 anyways, so this fix uses
the same configuration setting as is used for http and https.

The required proxy_protocol option for the listen directive was added in NGINX 1.11.4.

This fixes #255.

If proxy protocol is enabled on an AWS ELB in kubernetes using the
`service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'`
annotation on the load balancer service, it will enable PROXY PROTOCOL
on all ports forwarded by the ELB, which means the builder proxy on port
2222 also needs to use enable proxy_protocol on its listen directive.

There is currently no way to configure PROXY PROTOCOL per port on AWS
using kubenetes service annotation and it doesn't really make sense to
enable proxy protocol only for port 80 and 443 anyways, so this fix uses
the same configuration setting as is used for http and https.

This fixes deis#255.
@deis-admin
Copy link
Copy Markdown

Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it.

@deis-bot
Copy link
Copy Markdown

@krancour, @kmala and @robholland are potential reviewers of this pull request based on my analysis of git blame information. Thanks @felixbuenemann!

@helgi helgi added this to the v2.6 milestone Sep 27, 2016
@helgi helgi added the LGTM1 label Sep 27, 2016
@codecov-io
Copy link
Copy Markdown

Current coverage is 46.40% (diff: 100%)

Merging #263 into master will not change coverage

@@             master       #263   diff @@
==========================================
  Files             3          3          
  Lines           306        306          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            142        142          
  Misses          160        160          
  Partials          4          4          

Powered by Codecov. Last update 5a6b004...a729799

@mboersma
Copy link
Copy Markdown
Member

Jenkins, add to whitelist.

@mboersma mboersma merged commit 22241ea into deis:master Sep 27, 2016
@felixbuenemann felixbuenemann deleted the fix-builder-proxy-protocol-support branch September 27, 2016 21:18
felixbuenemann added a commit to felixbuenemann/workflow that referenced this pull request Sep 27, 2016
This adds a section on configuring PROXY protocol with a specific example targeting K8s on AWS using ELB.

Because of the fix in deis/router#263 this PR should likely be held back until Workflow v2.6.0 is released.
felixbuenemann added a commit to felixbuenemann/workflow that referenced this pull request Sep 28, 2016
This adds a section on configuring PROXY protocol with a specific example targeting K8s 1.3 on AWS using ELB.

Because of the fix in deis/router#263 this PR should likely be held back until Workflow v2.6.0 is released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS elb Proxy protocol breaking deis/builder

6 participants