plugins: set upstream unconditionally (#2956)

`upstream` is not needed as a setting; just set if unconditionally and
remove all documentation and tests for it.

At some point we want remove the hanlding for `upstream` as well and
error out on seeing it.

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben 2019-07-02 16:23:47 +01:00 committed by GitHub
parent 3a0c7c6153
commit 22c6e3e179
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 28 additions and 114 deletions

View file

@ -16,7 +16,6 @@ The route53 plugin can be used when coredns is deployed on AWS or elsewhere.
~~~ txt
route53 [ZONE:HOSTED_ZONE_ID...] {
[aws_access_key AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY]
upstream
credentials PROFILE [FILENAME]
fallthrough [ZONES...]
}
@ -34,9 +33,6 @@ route53 [ZONE:HOSTED_ZONE_ID...] {
AWS credentials the same way as AWS CLI, e.g., environmental variables, AWS credentials file,
instance profile credentials, etc.
* `upstream`is used for resolving services that point to external hosts (eg. used to resolve
CNAMEs). CoreDNS will resolve against itself.
* `credentials` is used for reading the credential file and setting the profile name for a given
zone.
@ -53,13 +49,11 @@ route53 [ZONE:HOSTED_ZONE_ID...] {
## Examples
Enable route53 with implicit AWS credentials and an upstream:
Enable route53 with implicit AWS credentials and and resolve CNAMEs via 10.0.0.1:
~~~ txt
. {
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
upstream
}
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7
forward . 10.0.0.1
}
~~~

View file

@ -23,19 +23,13 @@ func TestSetupRoute53(t *testing.T) {
{`route53 example.org:12345678 {
aws_access_key
}`, true},
{`route53 example.org:12345678 {
upstream 10.0.0.1
}`, false},
{`route53 example.org:12345678 { }`, false},
{`route53 example.org:12345678 {
upstream
}`, false},
{`route53 example.org:12345678 {
wat
{`route53 example.org:12345678 { }`, false},
{`route53 example.org:12345678 { wat
}`, true},
{`route53 example.org:12345678 {
aws_access_key ACCESS_KEY_ID SEKRIT_ACCESS_KEY
upstream 1.2.3.4
}`, false},
{`route53 example.org:12345678 {
@ -43,27 +37,21 @@ func TestSetupRoute53(t *testing.T) {
}`, false},
{`route53 example.org:12345678 {
credentials
upstream 1.2.3.4
}`, true},
{`route53 example.org:12345678 {
credentials default
upstream 1.2.3.4
}`, false},
{`route53 example.org:12345678 {
credentials default credentials
upstream 1.2.3.4
}`, false},
{`route53 example.org:12345678 {
credentials default credentials extra-arg
upstream 1.2.3.4
}`, true},
{`route53 example.org:12345678 example.org:12345678 {
upstream 1.2.3.4
}`, true},
{`route53 example.org {
upstream 1.2.3.4
}`, true},
}