Skip to content

Commit

Permalink
fix(dns): use parse-resolv-conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schönthal committed Jan 27, 2025
1 parent 6fccf91 commit 82427d0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,6 @@ jobs:
-e SERVER_COUNT=foo \
"${{ env.IMAGE_NAME }}"
- name: Run Docker Image with Invalid DNS Resolver
timeout-minutes: 1
id: test-validation-dns-resolver
continue-on-error: true
run: |
! docker run \
-e STRATEGY=PERCENTAGE \
-e OLD_DOMAIN=haproxy.com:443 -e NEW_DOMAIN=apache.org:443 \
-e COOKIE_PERCENTAGE_NAME=my_app \
-e DNS_RESOLVER=foo \
"${{ env.IMAGE_NAME }}"
- name: Check for failures
if: always()
env:
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ how much traffic should be routed to the old application
### PERCENTAGE_NEW
how much traffic should be routed to the new application

### DNS_RESOLVER (optional, default=1.1.1.1)
The DNS resolver to use for resolving the domain names to IP addresses.
If you want to reroute internal traffic you might want to change that.

### SERVER_COUNT (optional, default=5)
as we are using DNS Resolver we try to create a server for each IP address we get back from the DNS query.
This is the maximum amount of servers we will create.
Expand Down
3 changes: 1 addition & 2 deletions haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ global
presetenv PERCENTAGE_NEW "0"
presetenv PERCENTAGE_OLD "100"
presetenv SERVER_COUNT "5"
presetenv DNS_RESOLVER "1.1.1.1:53"

# we source them from the environment here to actually typecheck them
set-var proc.percentage_new int("${PERCENTAGE_NEW}")
Expand Down Expand Up @@ -81,5 +80,5 @@ backend cookie_strategy
server-template default_new "$SERVER_COUNT" "$NEW_DOMAIN"

resolvers dns
nameserver default "$DNS_RESOLVER"
parse-resolv-conf
accepted_payload_size 8192

0 comments on commit 82427d0

Please sign in to comment.