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

Oracle doc fix (add "key:" to secret) #750

Merged
merged 3 commits into from
Nov 6, 2018
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN make build

# final image
FROM registry.opensource.zalan.do/stups/alpine:latest
MAINTAINER Team Teapot @ Zalando SE <team-teapot@zalando.de>
LABEL maintainer="Team Teapot @ Zalando SE <team-teapot@zalando.de>"

COPY --from=builder /go/src/github.com/kubernetes-incubator/external-dns/build/external-dns /bin/external-dns

Expand Down
1 change: 1 addition & 0 deletions docs/tutorials/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ auth:
region: us-phoenix-1
tenancy: ocid1.tenancy.oc1...
user: ocid1.user.oc1...
key: |
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
fingerprint: af:81:71:8e...
Expand Down
11 changes: 10 additions & 1 deletion provider/domain_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,17 @@ func (df DomainFilter) Match(domain string) bool {
}

for _, filter := range df.filters {
strippedDomain := strings.TrimSuffix(domain, ".")

if strings.HasSuffix(strings.TrimSuffix(domain, "."), filter) {
if filter == "" {
return true
} else if strings.HasPrefix(filter, ".") && strings.HasSuffix(strippedDomain, filter) {
return true
} else if strings.Count(strippedDomain, ".") == strings.Count(filter, ".") {
if strippedDomain == filter {
return true
}
} else if strings.HasSuffix(strippedDomain, "."+filter) {
return true
}
}
Expand Down
30 changes: 30 additions & 0 deletions provider/domain_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,36 @@ var domainFilterTests = []domainFilterTest{
[]string{"foo.bar.sub.example.org"},
true,
},
{
[]string{"example.org"},
[]string{"anexample.org", "test.anexample.org"},
false,
},
{
[]string{".example.org"},
[]string{"anexample.org", "test.anexample.org"},
false,
},
{
[]string{".example.org"},
[]string{"example.org"},
false,
},
{
[]string{".example.org"},
[]string{"test.example.org"},
true,
},
{
[]string{"anexample.org"},
[]string{"example.org", "test.example.org"},
false,
},
{
[]string{".org"},
[]string{"example.org", "test.example.org", "foo.test.example.org"},
true,
},
}

func TestDomainFilterMatch(t *testing.T) {
Expand Down