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
79a956c1
Commit
79a956c1
authored
Dec 12, 2016
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
react to kube-dns yaml manifests moving
parent
4aeb3f3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
local-up-cluster.sh
hack/local-up-cluster.sh
+9
-9
local-up-discovery.sh
hack/local-up-discovery.sh
+2
-2
No files found.
hack/local-up-cluster.sh
View file @
79a956c1
...
...
@@ -611,29 +611,29 @@ function start_kubeproxy {
function
start_kubedns
{
if
[[
"
${
ENABLE_CLUSTER_DNS
}
"
=
true
]]
;
then
echo
"Creating kube-system namespace"
sed
-e
"s/{{ pillar
\[
'dns_replicas'
\]
}}/
${
DNS_REPLICAS
}
/g;s/{{ pillar
\[
'dns_domain'
\]
}}/
${
DNS_DOMAIN
}
/g;"
"
${
KUBE_ROOT
}
/cluster/addons/dns/
skydns-rc.yaml.in"
>
| sky
dns-rc.yaml
sed
-e
"s/{{ pillar
\[
'dns_replicas'
\]
}}/
${
DNS_REPLICAS
}
/g;s/{{ pillar
\[
'dns_domain'
\]
}}/
${
DNS_DOMAIN
}
/g;"
"
${
KUBE_ROOT
}
/cluster/addons/dns/
kubedns-controller.yaml.in"
>
| kube
dns-rc.yaml
if
[[
"
${
FEDERATION
:-}
"
==
"true"
]]
;
then
FEDERATIONS_DOMAIN_MAP
=
"
${
FEDERATIONS_DOMAIN_MAP
:-}
"
if
[[
-z
"
${
FEDERATIONS_DOMAIN_MAP
}
"
&&
-n
"
${
FEDERATION_NAME
:-}
"
&&
-n
"
${
DNS_ZONE_NAME
:-}
"
]]
;
then
FEDERATIONS_DOMAIN_MAP
=
"
${
FEDERATION_NAME
}
=
${
DNS_ZONE_NAME
}
"
fi
if
[[
-n
"
${
FEDERATIONS_DOMAIN_MAP
}
"
]]
;
then
sed
-i
-e
"s/{{ pillar
\[
'federations_domain_map'
\]
}}/- --federations=
${
FEDERATIONS_DOMAIN_MAP
}
/g"
sky
dns-rc.yaml
sed
-i
-e
"s/{{ pillar
\[
'federations_domain_map'
\]
}}/- --federations=
${
FEDERATIONS_DOMAIN_MAP
}
/g"
kube
dns-rc.yaml
else
sed
-i
-e
"/{{ pillar
\[
'federations_domain_map'
\]
}}/d"
sky
dns-rc.yaml
sed
-i
-e
"/{{ pillar
\[
'federations_domain_map'
\]
}}/d"
kube
dns-rc.yaml
fi
else
sed
-i
-e
"/{{ pillar
\[
'federations_domain_map'
\]
}}/d"
sky
dns-rc.yaml
sed
-i
-e
"/{{ pillar
\[
'federations_domain_map'
\]
}}/d"
kube
dns-rc.yaml
fi
sed
-e
"s/{{ pillar
\[
'dns_server'
\]
}}/
${
DNS_SERVER_IP
}
/g"
"
${
KUBE_ROOT
}
/cluster/addons/dns/
skydns-svc.yaml.in"
>
| sky
dns-svc.yaml
sed
-e
"s/{{ pillar
\[
'dns_server'
\]
}}/
${
DNS_SERVER_IP
}
/g"
"
${
KUBE_ROOT
}
/cluster/addons/dns/
kubedns-svc.yaml.in"
>
| kube
dns-svc.yaml
# TODO update to dns role once we have one.
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
create clusterrolebinding system:kube-dns
--clusterrole
=
cluster-admin
--serviceaccount
=
kube-system:default
# use kubectl to create
sky
dns rc and service
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
--namespace
=
kube-system create
-f
sky
dns-rc.yaml
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
--namespace
=
kube-system create
-f
sky
dns-svc.yaml
# use kubectl to create
kube
dns rc and service
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
--namespace
=
kube-system create
-f
kube
dns-rc.yaml
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
--namespace
=
kube-system create
-f
kube
dns-svc.yaml
echo
"Kube-dns rc and service successfully deployed."
rm
skydns-rc.yaml sky
dns-svc.yaml
rm
kubedns-rc.yaml kube
dns-svc.yaml
fi
}
...
...
hack/local-up-discovery.sh
View file @
79a956c1
#!/bin/bash
# Copyright 201
4
The Kubernetes Authors.
# Copyright 201
6
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
#
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,
...
...
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