deis / router

Edge router for Deis Workflow
https://deis.com
MIT License
80 stars 57 forks source link

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

Closed felixbuenemann closed 8 years ago

felixbuenemann commented 8 years ago

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.

deis-admin commented 8 years ago

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 commented 8 years ago

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

codecov-io commented 8 years ago

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 commented 8 years ago

Jenkins, add to whitelist.