Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
875c11a0
Commit
875c11a0
authored
Jan 10, 2019
by
Chris O'Haver
Committed by
Miek Gieben
Jan 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set minttl to ttl setting (#2446)
parent
0efa99e9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
31 deletions
+31
-31
plugin/kubernetes/handler_case_test.go
plugin/kubernetes/handler_case_test.go
+1
-1
plugin/kubernetes/handler_ignore_emptyservice_test.go
plugin/kubernetes/handler_ignore_emptyservice_test.go
+1
-1
plugin/kubernetes/handler_pod_disabled_test.go
plugin/kubernetes/handler_pod_disabled_test.go
+2
-2
plugin/kubernetes/handler_pod_insecure_test.go
plugin/kubernetes/handler_pod_insecure_test.go
+5
-5
plugin/kubernetes/handler_pod_verified_test.go
plugin/kubernetes/handler_pod_verified_test.go
+4
-4
plugin/kubernetes/handler_test.go
plugin/kubernetes/handler_test.go
+12
-12
plugin/kubernetes/reverse_test.go
plugin/kubernetes/reverse_test.go
+5
-5
plugin/kubernetes/xfr.go
plugin/kubernetes/xfr.go
+1
-1
No files found.
plugin/kubernetes/handler_case_test.go
View file @
875c11a0
...
@@ -16,7 +16,7 @@ var dnsPreserveCaseCases = []test.Case{
...
@@ -16,7 +16,7 @@ var dnsPreserveCaseCases = []test.Case{
Qname
:
"not-a-service.testns.svc.ClUsTeR.lOcAl."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"not-a-service.testns.svc.ClUsTeR.lOcAl."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"ClUsTeR.lOcAl.
30
IN SOA ns.dns.ClUsTeR.lOcAl. hostmaster.ClUsTeR.lOcAl. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"ClUsTeR.lOcAl.
5
IN SOA ns.dns.ClUsTeR.lOcAl. hostmaster.ClUsTeR.lOcAl. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// A Service
// A Service
...
...
plugin/kubernetes/handler_ignore_emptyservice_test.go
View file @
875c11a0
...
@@ -16,7 +16,7 @@ var dnsEmptyServiceTestCases = []test.Case{
...
@@ -16,7 +16,7 @@ var dnsEmptyServiceTestCases = []test.Case{
Qname
:
"svcempty.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"svcempty.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
}
}
...
...
plugin/kubernetes/handler_pod_disabled_test.go
View file @
875c11a0
...
@@ -15,14 +15,14 @@ var podModeDisabledCases = []test.Case{
...
@@ -15,14 +15,14 @@ var podModeDisabledCases = []test.Case{
Qname
:
"10-240-0-1.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"10-240-0-1.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"172-0-0-2.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"172-0-0-2.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
}
}
...
...
plugin/kubernetes/handler_pod_insecure_test.go
View file @
875c11a0
...
@@ -29,35 +29,35 @@ var podModeInsecureCases = []test.Case{
...
@@ -29,35 +29,35 @@ var podModeInsecureCases = []test.Case{
Qname
:
"blah.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"blah.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
},
},
},
},
{
{
Qname
:
"blah.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeAAAA
,
Qname
:
"blah.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeAAAA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
},
},
},
},
{
{
Qname
:
"blah.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeHINFO
,
Qname
:
"blah.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeHINFO
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
},
},
},
},
{
{
Qname
:
"blah.pod-nons.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"blah.pod-nons.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
},
},
},
},
{
{
Qname
:
"podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"
),
},
},
},
},
}
}
...
...
plugin/kubernetes/handler_pod_verified_test.go
View file @
875c11a0
...
@@ -22,28 +22,28 @@ var podModeVerifiedCases = []test.Case{
...
@@ -22,28 +22,28 @@ var podModeVerifiedCases = []test.Case{
Qname
:
"podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"svcns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"svcns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"pod-nons.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"pod-nons.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"172-0-0-2.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"172-0-0-2.podns.pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
}
}
...
...
plugin/kubernetes/handler_test.go
View file @
875c11a0
...
@@ -90,7 +90,7 @@ var dnsTestCases = []test.Case{
...
@@ -90,7 +90,7 @@ var dnsTestCases = []test.Case{
Qname
:
"*._not-udp-or-tcp.svc1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeSRV
,
Qname
:
"*._not-udp-or-tcp.svc1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeSRV
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// SRV Service
// SRV Service
...
@@ -201,7 +201,7 @@ var dnsTestCases = []test.Case{
...
@@ -201,7 +201,7 @@ var dnsTestCases = []test.Case{
Qname
:
"*.*.hdlsprtls.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeSRV
,
Qname
:
"*.*.hdlsprtls.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeSRV
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// AAAA
// AAAA
...
@@ -232,7 +232,7 @@ var dnsTestCases = []test.Case{
...
@@ -232,7 +232,7 @@ var dnsTestCases = []test.Case{
Qname
:
"svc1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeAAAA
,
Qname
:
"svc1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeAAAA
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// AAAA Service (non-existing service)
// AAAA Service (non-existing service)
...
@@ -240,7 +240,7 @@ var dnsTestCases = []test.Case{
...
@@ -240,7 +240,7 @@ var dnsTestCases = []test.Case{
Qname
:
"svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeAAAA
,
Qname
:
"svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeAAAA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// A Service (non-existing service)
// A Service (non-existing service)
...
@@ -248,7 +248,7 @@ var dnsTestCases = []test.Case{
...
@@ -248,7 +248,7 @@ var dnsTestCases = []test.Case{
Qname
:
"svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// A Service (non-existing namespace)
// A Service (non-existing namespace)
...
@@ -256,7 +256,7 @@ var dnsTestCases = []test.Case{
...
@@ -256,7 +256,7 @@ var dnsTestCases = []test.Case{
Qname
:
"svc0.svc-nons.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"svc0.svc-nons.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// TXT Schema
// TXT Schema
...
@@ -272,7 +272,7 @@ var dnsTestCases = []test.Case{
...
@@ -272,7 +272,7 @@ var dnsTestCases = []test.Case{
Qname
:
"bogusendpoint.hdls1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"bogusendpoint.hdls1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// A Service does not exist
// A Service does not exist
...
@@ -280,7 +280,7 @@ var dnsTestCases = []test.Case{
...
@@ -280,7 +280,7 @@ var dnsTestCases = []test.Case{
Qname
:
"bogusendpoint.svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"bogusendpoint.svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
// AAAA Service
// AAAA Service
...
@@ -324,21 +324,21 @@ var dnsTestCases = []test.Case{
...
@@ -324,21 +324,21 @@ var dnsTestCases = []test.Case{
Qname
:
"svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
303
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"pod.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
303
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
303
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
}
}
...
@@ -383,7 +383,7 @@ var notSyncedTestCases = []test.Case{
...
@@ -383,7 +383,7 @@ var notSyncedTestCases = []test.Case{
Qname
:
"svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"svc0.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeServerFailure
,
Rcode
:
dns
.
RcodeServerFailure
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
303
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 60"
),
},
},
},
},
}
}
...
...
plugin/kubernetes/reverse_test.go
View file @
875c11a0
...
@@ -151,35 +151,35 @@ func TestReverse(t *testing.T) {
...
@@ -151,35 +151,35 @@ func TestReverse(t *testing.T) {
Qname
:
"101.0.0.10.in-addr.arpa."
,
Qtype
:
dns
.
TypePTR
,
Qname
:
"101.0.0.10.in-addr.arpa."
,
Qtype
:
dns
.
TypePTR
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"0.10.in-addr.arpa.
30
IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"
),
test
.
SOA
(
"0.10.in-addr.arpa.
5
IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"example.org.cluster.local."
,
Qtype
:
dns
.
TypePTR
,
Qname
:
"example.org.cluster.local."
,
Qtype
:
dns
.
TypePTR
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"svc1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypePTR
,
Qname
:
"svc1.testns.svc.cluster.local."
,
Qtype
:
dns
.
TypePTR
,
Rcode
:
dns
.
RcodeSuccess
,
Rcode
:
dns
.
RcodeSuccess
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"svc1.testns.svc.0.10.in-addr.arpa."
,
Qtype
:
dns
.
TypeA
,
Qname
:
"svc1.testns.svc.0.10.in-addr.arpa."
,
Qtype
:
dns
.
TypeA
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"0.10.in-addr.arpa.
30
IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502989566 7200 1800 86400 60"
),
test
.
SOA
(
"0.10.in-addr.arpa.
5
IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502989566 7200 1800 86400 60"
),
},
},
},
},
{
{
Qname
:
"100.0.0.10.cluster.local."
,
Qtype
:
dns
.
TypePTR
,
Qname
:
"100.0.0.10.cluster.local."
,
Qtype
:
dns
.
TypePTR
,
Rcode
:
dns
.
RcodeNameError
,
Rcode
:
dns
.
RcodeNameError
,
Ns
:
[]
dns
.
RR
{
Ns
:
[]
dns
.
RR
{
test
.
SOA
(
"cluster.local.
30
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"
),
test
.
SOA
(
"cluster.local.
5
IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"
),
},
},
},
},
}
}
...
...
plugin/kubernetes/xfr.go
View file @
875c11a0
...
@@ -20,7 +20,7 @@ const transferLength = 2000
...
@@ -20,7 +20,7 @@ const transferLength = 2000
func
(
k
*
Kubernetes
)
Serial
(
state
request
.
Request
)
uint32
{
return
uint32
(
k
.
APIConn
.
Modified
())
}
func
(
k
*
Kubernetes
)
Serial
(
state
request
.
Request
)
uint32
{
return
uint32
(
k
.
APIConn
.
Modified
())
}
// MinTTL implements the Transferer interface.
// MinTTL implements the Transferer interface.
func
(
k
*
Kubernetes
)
MinTTL
(
state
request
.
Request
)
uint32
{
return
30
}
func
(
k
*
Kubernetes
)
MinTTL
(
state
request
.
Request
)
uint32
{
return
k
.
ttl
}
// Transfer implements the Transferer interface.
// Transfer implements the Transferer interface.
func
(
k
*
Kubernetes
)
Transfer
(
ctx
context
.
Context
,
state
request
.
Request
)
(
int
,
error
)
{
func
(
k
*
Kubernetes
)
Transfer
(
ctx
context
.
Context
,
state
request
.
Request
)
(
int
,
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment