Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c346ae1e
Commit
c346ae1e
authored
Jan 24, 2019
by
Sandeep Rajan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use forward plugin instead of proxy in the default configuration
parent
73760018
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
coredns.yaml.base
cluster/addons/dns/coredns/coredns.yaml.base
+1
-1
coredns.yaml.in
cluster/addons/dns/coredns/coredns.yaml.in
+1
-1
coredns.yaml.sed
cluster/addons/dns/coredns/coredns.yaml.sed
+1
-1
dns.go
cmd/kubeadm/app/phases/addons/dns/dns.go
+4
-4
dns_test.go
cmd/kubeadm/app/phases/addons/dns/dns_test.go
+9
-9
manifests.go
cmd/kubeadm/app/phases/addons/dns/manifests.go
+1
-1
No files found.
cluster/addons/dns/coredns/coredns.yaml.base
View file @
c346ae1e
...
...
@@ -70,7 +70,7 @@ data:
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
proxy
. /etc/resolv.conf
forward
. /etc/resolv.conf
cache 30
loop
reload
...
...
cluster/addons/dns/coredns/coredns.yaml.in
View file @
c346ae1e
...
...
@@ -70,7 +70,7 @@ data:
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
proxy
. /etc/resolv.conf
forward
. /etc/resolv.conf
cache 30
loop
reload
...
...
cluster/addons/dns/coredns/coredns.yaml.sed
View file @
c346ae1e
...
...
@@ -70,7 +70,7 @@ data:
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
prox
y
.
/et
c
/resolv.conf
forward
. /etc/resolv.conf
cache 30
loop
reload
...
...
cmd/kubeadm/app/phases/addons/dns/dns.go
View file @
c346ae1e
...
...
@@ -172,7 +172,7 @@ func coreDNSAddon(cfg *kubeadmapi.InitConfiguration, client clientset.Interface)
return
err
}
stubDomain
,
err
:=
translateStubDomainOfKubeDNSTo
Proxy
CoreDNS
(
kubeDNSStubDomain
,
kubeDNSConfigMap
)
stubDomain
,
err
:=
translateStubDomainOfKubeDNSTo
Forward
CoreDNS
(
kubeDNSStubDomain
,
kubeDNSConfigMap
)
if
err
!=
nil
{
return
err
}
...
...
@@ -294,9 +294,9 @@ func createDNSService(dnsService *v1.Service, serviceBytes []byte, client client
return
nil
}
// translateStubDomainOfKubeDNSTo
Proxy
CoreDNS translates StubDomain Data in kube-dns ConfigMap
// translateStubDomainOfKubeDNSTo
Forward
CoreDNS translates StubDomain Data in kube-dns ConfigMap
// in the form of Proxy for the CoreDNS Corefile.
func
translateStubDomainOfKubeDNSTo
Proxy
CoreDNS
(
dataField
string
,
kubeDNSConfigMap
*
v1
.
ConfigMap
)
(
string
,
error
)
{
func
translateStubDomainOfKubeDNSTo
Forward
CoreDNS
(
dataField
string
,
kubeDNSConfigMap
*
v1
.
ConfigMap
)
(
string
,
error
)
{
if
kubeDNSConfigMap
==
nil
{
return
""
,
nil
}
...
...
@@ -316,7 +316,7 @@ func translateStubDomainOfKubeDNSToProxyCoreDNS(dataField string, kubeDNSConfigM
{
"errors"
},
{
"cache"
,
"30"
},
{
"loop"
},
append
([]
string
{
"
proxy
"
,
"."
},
proxyIP
...
),
append
([]
string
{
"
forward
"
,
"."
},
proxyIP
...
),
}
proxyStanza
=
append
(
proxyStanza
,
pStanza
)
}
...
...
cmd/kubeadm/app/phases/addons/dns/dns_test.go
View file @
c346ae1e
...
...
@@ -206,28 +206,28 @@ func TestTranslateStubDomainKubeDNSToCoreDNS(t *testing.T) {
errors
cache 30
loop
proxy
. 1.2.3.4:5300 3.3.3.3
forward
. 1.2.3.4:5300 3.3.3.3
}
my.cluster.local:53 {
errors
cache 30
loop
proxy
. 2.3.4.5
forward
. 2.3.4.5
}`
,
expectTwo
:
`
my.cluster.local:53 {
errors
cache 30
loop
proxy
. 2.3.4.5
forward
. 2.3.4.5
}
foo.com:53 {
errors
cache 30
loop
proxy
. 1.2.3.4:5300 3.3.3.3
forward
. 1.2.3.4:5300 3.3.3.3
}`
,
},
{
...
...
@@ -257,28 +257,28 @@ func TestTranslateStubDomainKubeDNSToCoreDNS(t *testing.T) {
errors
cache 30
loop
proxy
. 1.2.3.4:5300
forward
. 1.2.3.4:5300
}
my.cluster.local:53 {
errors
cache 30
loop
proxy
. 2.3.4.5
forward
. 2.3.4.5
}`
,
expectTwo
:
`
my.cluster.local:53 {
errors
cache 30
loop
proxy
. 2.3.4.5
forward
. 2.3.4.5
}
foo.com:53 {
errors
cache 30
loop
proxy
. 1.2.3.4:5300
forward
. 1.2.3.4:5300
}`
,
},
{
...
...
@@ -296,7 +296,7 @@ func TestTranslateStubDomainKubeDNSToCoreDNS(t *testing.T) {
},
}
for
_
,
testCase
:=
range
testCases
{
out
,
err
:=
translateStubDomainOfKubeDNSTo
Proxy
CoreDNS
(
kubeDNSStubDomain
,
testCase
.
configMap
)
out
,
err
:=
translateStubDomainOfKubeDNSTo
Forward
CoreDNS
(
kubeDNSStubDomain
,
testCase
.
configMap
)
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
}
...
...
cmd/kubeadm/app/phases/addons/dns/manifests.go
View file @
c346ae1e
...
...
@@ -309,7 +309,7 @@ data:
fallthrough in-addr.arpa ip6.arpa
}{{ .Federation }}
prometheus :9153
proxy
. {{ .UpstreamNameserver }}
forward
. {{ .UpstreamNameserver }}
cache 30
loop
reload
...
...
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