Skip to content

Commit 744a4e5

Browse files
digitalkaozRobert Schönthal
and
Robert Schönthal
authored
fix(dns): use parse-resolv-conf (#5)
Co-authored-by: Robert Schönthal <[email protected]>
1 parent e179414 commit 744a4e5

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

.github/workflows/test.yaml

-12
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,6 @@ jobs:
187187
-e SERVER_COUNT=foo \
188188
"${{ env.IMAGE_NAME }}"
189189
190-
- name: Run Docker Image with Invalid DNS Resolver
191-
timeout-minutes: 1
192-
id: test-validation-dns-resolver
193-
continue-on-error: true
194-
run: |
195-
! docker run \
196-
-e STRATEGY=PERCENTAGE \
197-
-e OLD_DOMAIN=haproxy.com:443 -e NEW_DOMAIN=apache.org:443 \
198-
-e COOKIE_PERCENTAGE_NAME=my_app \
199-
-e DNS_RESOLVER=foo \
200-
"${{ env.IMAGE_NAME }}"
201-
202190
- name: Check for failures
203191
if: always()
204192
env:

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ how much traffic should be routed to the old application
4141
### PERCENTAGE_NEW
4242
how much traffic should be routed to the new application
4343

44-
### DNS_RESOLVER (optional, default=1.1.1.1)
45-
The DNS resolver to use for resolving the domain names to IP addresses.
46-
If you want to reroute internal traffic you might want to change that.
47-
4844
### SERVER_COUNT (optional, default=5)
4945
as we are using DNS Resolver we try to create a server for each IP address we get back from the DNS query.
5046
This is the maximum amount of servers we will create.

haproxy.cfg

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ global
1111
presetenv PERCENTAGE_NEW "0"
1212
presetenv PERCENTAGE_OLD "100"
1313
presetenv SERVER_COUNT "5"
14-
presetenv DNS_RESOLVER "1.1.1.1:53"
1514

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

8382
resolvers dns
84-
nameserver default "$DNS_RESOLVER"
83+
parse-resolv-conf
8584
accepted_payload_size 8192

0 commit comments

Comments
 (0)