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
753632d8
Commit
753632d8
authored
Mar 23, 2018
by
Sandeep Rajan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create coredns and kube-dns folders
parent
8ad67d34
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
51 additions
and
8 deletions
+51
-8
Makefile
cluster/addons/dns/coredns/Makefile
+1
-1
coredns.yaml.base
cluster/addons/dns/coredns/coredns.yaml.base
+0
-0
coredns.yaml.in
cluster/addons/dns/coredns/coredns.yaml.in
+0
-0
coredns.yaml.sed
cluster/addons/dns/coredns/coredns.yaml.sed
+0
-0
transforms2salt.sed
cluster/addons/dns/coredns/transforms2salt.sed
+0
-0
transforms2sed.sed
cluster/addons/dns/coredns/transforms2sed.sed
+0
-0
Makefile
cluster/addons/dns/kube-dns/Makefile
+34
-0
README.md
cluster/addons/dns/kube-dns/README.md
+0
-0
kube-dns.yaml.base
cluster/addons/dns/kube-dns/kube-dns.yaml.base
+0
-0
kube-dns.yaml.in
cluster/addons/dns/kube-dns/kube-dns.yaml.in
+0
-0
kube-dns.yaml.sed
cluster/addons/dns/kube-dns/kube-dns.yaml.sed
+0
-0
transforms2salt.sed
cluster/addons/dns/kube-dns/transforms2salt.sed
+4
-0
transforms2sed.sed
cluster/addons/dns/kube-dns/transforms2sed.sed
+4
-0
deployAddons.sh
cluster/centos/deployAddons.sh
+1
-1
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+6
-5
local-up-cluster.sh
hack/local-up-cluster.sh
+1
-1
No files found.
cluster/addons/dns/Makefile
→
cluster/addons/dns/
coredns/
Makefile
View file @
753632d8
...
@@ -29,6 +29,6 @@ all: transform
...
@@ -29,6 +29,6 @@ all: transform
%.sed
:
%.base
%.sed
:
%.base
sed
-f
transforms2sed.sed
$<
|
sed
s/__SOURCE_FILENAME__/
$<
/g
>
$@
sed
-f
transforms2sed.sed
$<
|
sed
s/__SOURCE_FILENAME__/
$<
/g
>
$@
transform
:
kube-dns.yaml.in kube-dns.yaml.sed
coredns.yaml.in coredns.yaml.sed
transform
:
coredns.yaml.in coredns.yaml.sed
.PHONY
:
transform
.PHONY
:
transform
cluster/addons/dns/coredns.yaml.base
→
cluster/addons/dns/coredns
/coredns
.yaml.base
View file @
753632d8
File moved
cluster/addons/dns/coredns.yaml.in
→
cluster/addons/dns/coredns
/coredns
.yaml.in
View file @
753632d8
File moved
cluster/addons/dns/coredns.yaml.sed
→
cluster/addons/dns/coredns
/coredns
.yaml.sed
View file @
753632d8
File moved
cluster/addons/dns/transforms2salt.sed
→
cluster/addons/dns/
coredns/
transforms2salt.sed
View file @
753632d8
File moved
cluster/addons/dns/transforms2sed.sed
→
cluster/addons/dns/
coredns/
transforms2sed.sed
View file @
753632d8
File moved
cluster/addons/dns/kube-dns/Makefile
0 → 100644
View file @
753632d8
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Makefile for the kubedns underscore templates to Salt/Pillar and other formats.
# If you update the *.base templates, please run this Makefile before pushing.
#
# Usage:
# make
all
:
transform
# .base -> .in pattern rule
%.in
:
%.base
sed
-f
transforms2salt.sed
$<
|
sed
s/__SOURCE_FILENAME__/
$<
/g
>
$@
# .base -> .sed pattern rule
%.sed
:
%.base
sed
-f
transforms2sed.sed
$<
|
sed
s/__SOURCE_FILENAME__/
$<
/g
>
$@
transform
:
kube-dns.yaml.in kube-dns.yaml.sed
.PHONY
:
transform
cluster/addons/dns/README.md
→
cluster/addons/dns/
kube-dns/
README.md
View file @
753632d8
File moved
cluster/addons/dns/kube-dns.yaml.base
→
cluster/addons/dns/kube-dns
/kube-dns
.yaml.base
View file @
753632d8
File moved
cluster/addons/dns/kube-dns.yaml.in
→
cluster/addons/dns/kube-dns
/kube-dns
.yaml.in
View file @
753632d8
File moved
cluster/addons/dns/kube-dns.yaml.sed
→
cluster/addons/dns/kube-dns
/kube-dns
.yaml.sed
View file @
753632d8
File moved
cluster/addons/dns/kube-dns/transforms2salt.sed
0 → 100644
View file @
753632d8
s
/
__PILLAR__DNS__SERVER__
/
{{ pillar['dns_server'] }}
/
g
s
/
__PILLAR__DNS__DOMAIN__
/
{{ pillar['dns_domain'] }}
/
g
s
/
__PILLAR__CLUSTER_CIDR__
/
{{ pillar['service_cluster_ip_range'] }}
/
g
s
/
__MACHINE_GENERATED_WARNING__
/
Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__
/
g
cluster/addons/dns/kube-dns/transforms2sed.sed
0 → 100644
View file @
753632d8
s
/
__PILLAR__DNS__SERVER__
/
$DNS_SERVER_IP
/
g
s
/
__PILLAR__DNS__DOMAIN__
/
$DNS_DOMAIN
/
g
s
/
__PILLAR__CLUSTER_CIDR__
/
$SERVICE_CLUSTER_IP_RANGE
/
g
s
/
__MACHINE_GENERATED_WARNING__
/
Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__
/
g
cluster/centos/deployAddons.sh
View file @
753632d8
...
@@ -26,7 +26,7 @@ export KUBE_CONFIG_FILE=${KUBE_CONFIG_FILE:-${KUBE_ROOT}/cluster/centos/config-d
...
@@ -26,7 +26,7 @@ export KUBE_CONFIG_FILE=${KUBE_CONFIG_FILE:-${KUBE_ROOT}/cluster/centos/config-d
function
deploy_dns
{
function
deploy_dns
{
echo
"Deploying DNS on Kubernetes"
echo
"Deploying DNS on Kubernetes"
cp
"
${
KUBE_ROOT
}
/cluster/addons/dns/kube-dns.yaml.sed"
kube-dns.yaml
cp
"
${
KUBE_ROOT
}
/cluster/addons/dns/kube-dns
/kube-dns
.yaml.sed"
kube-dns.yaml
sed
-i
-e
"s/
\\\$
DNS_DOMAIN/
${
DNS_DOMAIN
}
/g"
kube-dns.yaml
sed
-i
-e
"s/
\\\$
DNS_DOMAIN/
${
DNS_DOMAIN
}
/g"
kube-dns.yaml
sed
-i
-e
"s/
\\\$
DNS_SERVER_IP/
${
DNS_SERVER_IP
}
/g"
kube-dns.yaml
sed
-i
-e
"s/
\\\$
DNS_SERVER_IP/
${
DNS_SERVER_IP
}
/g"
kube-dns.yaml
...
...
cluster/gce/gci/configure-helper.sh
View file @
753632d8
...
@@ -2175,8 +2175,8 @@ function update-dashboard-controller {
...
@@ -2175,8 +2175,8 @@ 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.yaml"
local
-r
coredns_file
=
"
${
dst_dir
}
/dns/coredns
/coredns
.yaml"
mv
"
${
dst_dir
}
/dns/coredns.yaml.in"
"
${
coredns_file
}
"
mv
"
${
dst_dir
}
/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
}
"
...
@@ -2215,8 +2215,8 @@ function setup-fluentd {
...
@@ -2215,8 +2215,8 @@ 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.yaml"
local
-r
kubedns_file
=
"
${
dst_dir
}
/dns/kube-dns
/kube-dns
.yaml"
mv
"
${
dst_dir
}
/dns/kube-dns.yaml.in"
"
${
kubedns_file
}
"
mv
"
${
dst_dir
}
/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
...
@@ -2341,10 +2341,11 @@ EOF
...
@@ -2341,10 +2341,11 @@ EOF
setup-addon-manifests
"addons"
"device-plugins/nvidia-gpu"
setup-addon-manifests
"addons"
"device-plugins/nvidia-gpu"
fi
fi
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns"
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
fi
fi
...
...
hack/local-up-cluster.sh
View file @
753632d8
...
@@ -905,7 +905,7 @@ EOF
...
@@ -905,7 +905,7 @@ EOF
function
start_kubedns
{
function
start_kubedns
{
if
[[
"
${
ENABLE_CLUSTER_DNS
}
"
=
true
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_DNS
}
"
=
true
]]
;
then
cp
"
${
KUBE_ROOT
}
/cluster/addons/dns/kube-dns.yaml.in"
kube-dns.yaml
cp
"
${
KUBE_ROOT
}
/cluster/addons/dns/kube-dns
/kube-dns
.yaml.in"
kube-dns.yaml
sed
-i
-e
"s/{{ pillar
\[
'dns_domain'
\]
}}/
${
DNS_DOMAIN
}
/g"
kube-dns.yaml
sed
-i
-e
"s/{{ pillar
\[
'dns_domain'
\]
}}/
${
DNS_DOMAIN
}
/g"
kube-dns.yaml
sed
-i
-e
"s/{{ pillar
\[
'dns_server'
\]
}}/
${
DNS_SERVER_IP
}
/g"
kube-dns.yaml
sed
-i
-e
"s/{{ pillar
\[
'dns_server'
\]
}}/
${
DNS_SERVER_IP
}
/g"
kube-dns.yaml
...
...
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