-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
As described in the Issue #154 this adds the ability to fall-back to another edge dns server from the list. These are passed to the operator as env variable `EDGE_DNS_SERVERS` (was singular before) and the value is a comma-separted list of ips/hostnames followed optionally with port number. example: `1.1.1.1:11, 2.2.2.2,hostname` (spaces between entries are supported). Then function `Dig` in `dns.go` has been modified to work with this list (variadic function) and also `Exchange` function in the same file was tweaked to support it. This change doesn't break the backward compatibility, because both `EDGE_DNS_{SERVER,PORT}` still works, but user is notified in the operator logs that these two were deprecated. Some old tests needed to be modified in order to pass and I've added also these new tests: (`in controllers/depresolver/depresolver_test.go`) - TestResolveConfigWithEmptyEdgeDNSServersKey - TestResolveConfigWithMalformedEdgeDNSServersKey - TestResolveConfigWithTwoEdgeDnsServers - TestResolveConfigWithMultipleEdgeDnsServers1 - TestResolveConfigWithMultipleEdgeDnsServers2 - TestResolveConfigWithMultipleEdgeDnsServersMalformed1 - TestResolveConfigWithMultipleEdgeDnsServersMalformed2 - TestResolveConfigWithInvalidEdgeDnsServersValue - TestResolveConfigWithMultipleEdgeDnsServersLocalhostNotFirst (in `controllers/gslb_controller_test.go`) - TestReturnsExternalRecordsUsingFailoverStrategyAndFallbackDNSserver (in `controllers/internal/utils/dns_test.go`) - TestOneValidEdgeDNSInTheList - TestNoValidEdgeDNSInTheList - TestEmptyEdgeDNSInTheList - TestMultipleValidEdgeDNSInTheList - TestEmptyDNSList - TestValidDigFQDNWithDot Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
- Loading branch information
Showing
17 changed files
with
760 additions
and
168 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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
Oops, something went wrong.