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
cf813b24
Unverified
Commit
cf813b24
authored
Dec 18, 2018
by
Kubernetes Prow Robot
Committed by
GitHub
Dec 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71977 from rramkumar1/kube-dns-ordering
DNS service ordering for addon manager
parents
64bf2ac5
bc449408
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+16
-8
No files found.
cluster/gce/gci/configure-helper.sh
View file @
cf813b24
...
@@ -2296,8 +2296,9 @@ function update-dashboard-controller {
...
@@ -2296,8 +2296,9 @@ function update-dashboard-controller {
# Sets up the manifests of coreDNS for k8s addons.
# Sets up the manifests of coreDNS for k8s addons.
function
setup-coredns-manifest
{
function
setup-coredns-manifest
{
local
-r
coredns_file
=
"
${
dst_dir
}
/dns/coredns/coredns.yaml"
setup-addon-manifests
"addons"
"0-dns/coredns"
mv
"
${
dst_dir
}
/dns/coredns/coredns.yaml.in"
"
${
coredns_file
}
"
local
-r
coredns_file
=
"
${
dst_dir
}
/0-dns/coredns/coredns.yaml"
mv
"
${
dst_dir
}
/0-dns/coredns/coredns.yaml.in"
"
${
coredns_file
}
"
# Replace the salt configurations with variable values.
# Replace the salt configurations with variable values.
sed
-i
-e
"s@{{ *pillar
\[
'dns_domain'
\]
*}}@
${
DNS_DOMAIN
}
@g"
"
${
coredns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_domain'
\]
*}}@
${
DNS_DOMAIN
}
@g"
"
${
coredns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_server'
\]
*}}@
${
DNS_SERVER_IP
}
@g"
"
${
coredns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_server'
\]
*}}@
${
DNS_SERVER_IP
}
@g"
"
${
coredns_file
}
"
...
@@ -2340,8 +2341,9 @@ function setup-fluentd {
...
@@ -2340,8 +2341,9 @@ function setup-fluentd {
# Sets up the manifests of kube-dns for k8s addons.
# Sets up the manifests of kube-dns for k8s addons.
function
setup-kube-dns-manifest
{
function
setup-kube-dns-manifest
{
local
-r
kubedns_file
=
"
${
dst_dir
}
/dns/kube-dns/kube-dns.yaml"
setup-addon-manifests
"addons"
"0-dns/kube-dns"
mv
"
${
dst_dir
}
/dns/kube-dns/kube-dns.yaml.in"
"
${
kubedns_file
}
"
local
-r
kubedns_file
=
"
${
dst_dir
}
/0-dns/kube-dns/kube-dns.yaml"
mv
"
${
dst_dir
}
/0-dns/kube-dns/kube-dns.yaml.in"
"
${
kubedns_file
}
"
if
[
-n
"
${
CUSTOM_KUBE_DNS_YAML
:-}
"
]
;
then
if
[
-n
"
${
CUSTOM_KUBE_DNS_YAML
:-}
"
]
;
then
# Replace with custom GKE kube-dns deployment.
# Replace with custom GKE kube-dns deployment.
cat
>
"
${
kubedns_file
}
"
<<
EOF
cat
>
"
${
kubedns_file
}
"
<<
EOF
...
@@ -2362,8 +2364,8 @@ EOF
...
@@ -2362,8 +2364,8 @@ EOF
# Sets up the manifests of local dns cache agent for k8s addons.
# Sets up the manifests of local dns cache agent for k8s addons.
function
setup-nodelocaldns-manifest
{
function
setup-nodelocaldns-manifest
{
setup-addon-manifests
"addons"
"dns/nodelocaldns"
setup-addon-manifests
"addons"
"
0-
dns/nodelocaldns"
local
-r
localdns_file
=
"
${
dst_dir
}
/dns/nodelocaldns/nodelocaldns.yaml"
local
-r
localdns_file
=
"
${
dst_dir
}
/
0-
dns/nodelocaldns/nodelocaldns.yaml"
# Replace the sed configurations with variable values.
# Replace the sed configurations with variable values.
sed
-i
-e
"s/__PILLAR__DNS__DOMAIN__/
${
DNS_DOMAIN
}
/g"
"
${
localdns_file
}
"
sed
-i
-e
"s/__PILLAR__DNS__DOMAIN__/
${
DNS_DOMAIN
}
/g"
"
${
localdns_file
}
"
sed
-i
-e
"s/__PILLAR__DNS__SERVER__/
${
DNS_SERVER_IP
}
/g"
"
${
localdns_file
}
"
sed
-i
-e
"s/__PILLAR__DNS__SERVER__/
${
DNS_SERVER_IP
}
/g"
"
${
localdns_file
}
"
...
@@ -2534,11 +2536,17 @@ EOF
...
@@ -2534,11 +2536,17 @@ EOF
setup-node-termination-handler-manifest
setup-node-termination-handler-manifest
fi
fi
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
# Create a new directory for the DNS addon and prepend a "0" on the name.
# Prepending "0" to the directory ensures that add-on manager
# creates the dns service first. This ensures no other add-on
# can "steal" the designated DNS clusterIP.
BASE_ADDON_DIR
=
${
KUBE_HOME
}
/kube-manifests/kubernetes/gci-trusty
BASE_DNS_DIR
=
${
BASE_ADDON_DIR
}
/dns
NEW_DNS_DIR
=
${
BASE_ADDON_DIR
}
/0-dns
mkdir
${
NEW_DNS_DIR
}
&&
mv
${
BASE_DNS_DIR
}
/
*
${
NEW_DNS_DIR
}
&&
rm
-r
${
BASE_DNS_DIR
}
if
[[
"
${
CLUSTER_DNS_CORE_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
CLUSTER_DNS_CORE_DNS
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns/coredns"
setup-coredns-manifest
setup-coredns-manifest
else
else
setup-addon-manifests
"addons"
"dns/kube-dns"
setup-kube-dns-manifest
setup-kube-dns-manifest
fi
fi
if
[[
"
${
ENABLE_NODELOCAL_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_NODELOCAL_DNS
:-}
"
==
"true"
]]
;
then
...
...
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