-
Notifications
You must be signed in to change notification settings - Fork 11
Flag to disable TLS handling by proxy #18
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1599872
Add flag to prevent proxy from requesting certificate using ACME
ebariaux 8f785ee
Add configuration supporting case when TLS is terminated before reach…
ebariaux 32de670
Always start monitoring, independent of DISABLE_ACME flag
ebariaux 43e5c12
Make Dockerfile health check use proper HTTP port
ebariaux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| # | ||
| # Use this config when TLS is terminated externally before traffic reaches | ||
| # this pod. HAProxy receives plain HTTP and plain TCP MQTT. | ||
| # | ||
| global | ||
| log stdout format raw local0 "${PROXY_LOGLEVEL}" | ||
|
|
||
| tune.ssl.default-dh-param 4096 | ||
| # Works around breaking change in docker 23+ - just uses the old docker default value | ||
| fd-hard-limit 1048576 | ||
|
|
||
| defaults | ||
| log global | ||
| mode http | ||
| log-format "%T %ft %ci:%cp %s %TR/%Tw/%Tc/%Tr/%Ta %{+Q}r %ST %ac/%fc/%bc/%sc/%rc %sq/%bq" | ||
| timeout connect 30s | ||
| timeout client 60s | ||
| timeout server 60s | ||
| timeout tunnel 720m | ||
| # never fail on address resolution | ||
| default-server init-addr none | ||
|
|
||
| resolvers docker_resolver | ||
| nameserver dns "${NAMESERVER}" | ||
|
|
||
| frontend stats | ||
| bind *:8404 | ||
| http-request use-service prometheus-exporter if { path /metrics } | ||
| stats enable | ||
| stats uri /stats | ||
| stats refresh 10s | ||
|
|
||
| frontend http | ||
| bind *:"${HTTP_PORT}" | ||
|
|
||
| # Static health endpoint for docker healthcheck (don't log it) | ||
| acl url_docker_health path /docker-health | ||
| http-request set-log-level silent if url_docker_health | ||
| http-request return status 200 if url_docker_health | ||
|
|
||
| # TLS was already terminated upstream, so propagate the original scheme. | ||
| option forwardfor | ||
| http-request add-header X-Forwarded-Proto https | ||
| http-request set-header X-Forwarded-Host %[req.hdr(Host)] | ||
| http-request add-header X-Forwarded-Port "${HTTPS_FORWARDED_PORT}" | ||
| http-response add-header Strict-Transport-Security max-age=15768000 | ||
| http-response add-header X-Robots-Tag noindex | ||
|
|
||
| # Gateway tunnelling config | ||
| .if defined(SISH_HOST) && defined(SISH_PORT) | ||
| acl gateway_sub_domain hdr_beg(host) gw- | ||
| use_backend sish if gateway_sub_domain | ||
| .endif | ||
|
|
||
| acl auth path_beg "${KEYCLOAK_PATH_PREFIX}/auth" | ||
| use_backend keycloak_backend if auth | ||
|
|
||
| use_backend manager_backend | ||
|
|
||
| listen mqtt | ||
| bind *:"${MANAGER_MQTT_PORT}" | ||
| mode tcp | ||
|
|
||
| .if defined(MQTT_RATE_LIMIT) | ||
| # Rate limiting | ||
| acl too_fast fe_sess_rate ge "${MQTT_RATE_LIMIT}" | ||
| tcp-request connection reject if too_fast | ||
| .endif | ||
|
|
||
| option clitcpka | ||
| timeout client 3h | ||
| timeout server 3h | ||
| option logasap | ||
| log-format "%T %ft CLIENT=%ci:%cp BACKEND=%bi:%bp %ts %ac/%fc/%bc/%sc/%rc %sq/%bq" | ||
| balance leastconn | ||
|
|
||
| server manager "${MANAGER_HOST}":"${MANAGER_MQTT_PORT}" resolvers docker_resolver | ||
|
|
||
| backend manager_backend | ||
| compression algo gzip deflate | ||
| compression type text/html text/css application/javascript application/json image/svg+xml | ||
| compression offload | ||
| server manager "${MANAGER_HOST}":"${MANAGER_WEB_PORT}" resolvers docker_resolver | ||
| .if defined(MANAGER_PATH_PREFIX) | ||
| http-request replace-path ^"${MANAGER_PATH_PREFIX}"(/.*)?$ \1 | ||
| .endif | ||
|
|
||
| backend keycloak_backend | ||
| server keycloak "${KEYCLOAK_HOST}":"${KEYCLOAK_PORT}" resolvers docker_resolver | ||
|
|
||
| # Gateway tunnelling config | ||
| .if defined(SISH_HOST) && defined(SISH_PORT) | ||
| backend sish | ||
| server sish "${SISH_HOST}":"${SISH_PORT}" resolvers docker_resolver | ||
| .endif |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.