Skip to content
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

Feat/dns resolving #5

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading