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
939d1b3b
Commit
939d1b3b
authored
Nov 16, 2017
by
Sandeep Rajan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indent
parent
13448719
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
configure-helper.sh
cluster/gce/container-linux/configure-helper.sh
+19
-19
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+17
-17
No files found.
cluster/gce/container-linux/configure-helper.sh
View file @
939d1b3b
...
@@ -1228,34 +1228,34 @@ function update-prometheus-to-sd-parameters {
...
@@ -1228,34 +1228,34 @@ function update-prometheus-to-sd-parameters {
fi
fi
}
}
#
Prepares
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.yaml"
mv
"
${
dst_dir
}
/dns/coredns.yaml.in"
"
${
coredns_file
}
"
mv
"
${
dst_dir
}
/dns/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
}
"
sed
-i
-e
"s@{{ *pillar
\[
'service_cluster_ip_range'
\]
*}}@
${
SERVICE_CLUSTER_IP_RANGE
}
@g"
"
${
coredns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'service_cluster_ip_range'
\]
*}}@
${
SERVICE_CLUSTER_IP_RANGE
}
@g"
"
${
coredns_file
}
"
}
}
#
Prepares
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.yaml"
mv
"
${
dst_dir
}
/dns/kube-dns.yaml.in"
"
${
kubedns_file
}
"
mv
"
${
dst_dir
}
/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
$(
echo
"
$CUSTOM_KUBE_DNS_YAML
"
)
$(
echo
"
$CUSTOM_KUBE_DNS_YAML
"
)
EOF
EOF
update-prometheus-to-sd-parameters
${
kubedns_file
}
update-prometheus-to-sd-parameters
${
kubedns_file
}
fi
fi
# Replace the salt configurations with variable values.
# Replace the salt configurations with variable values.
sed
-i
-e
"s@{{ *pillar
\[
'dns_domain'
\]
*}}@
${
DNS_DOMAIN
}
@g"
"
${
kubedns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_domain'
\]
*}}@
${
DNS_DOMAIN
}
@g"
"
${
kubedns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_server'
\]
*}}@
${
DNS_SERVER_IP
}
@g"
"
${
kubedns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_server'
\]
*}}@
${
DNS_SERVER_IP
}
@g"
"
${
kubedns_file
}
"
if
[[
"
${
ENABLE_DNS_HORIZONTAL_AUTOSCALER
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_DNS_HORIZONTAL_AUTOSCALER
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns-horizontal-autoscaler"
setup-addon-manifests
"addons"
"dns-horizontal-autoscaler"
fi
fi
}
}
# Prepares the manifests of k8s addons, and starts the addon manager.
# Prepares the manifests of k8s addons, and starts the addon manager.
...
...
cluster/gce/gci/configure-helper.sh
View file @
939d1b3b
...
@@ -1765,31 +1765,31 @@ function update-prometheus-to-sd-parameters {
...
@@ -1765,31 +1765,31 @@ function update-prometheus-to-sd-parameters {
# 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.yaml"
mv
"
${
dst_dir
}
/dns/coredns.yaml.in"
"
${
coredns_file
}
"
mv
"
${
dst_dir
}
/dns/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
}
"
sed
-i
-e
"s@{{ *pillar
\[
'service_cluster_ip_range'
\]
*}}@
${
SERVICE_CLUSTER_IP_RANGE
}
@g"
"
${
coredns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'service_cluster_ip_range'
\]
*}}@
${
SERVICE_CLUSTER_IP_RANGE
}
@g"
"
${
coredns_file
}
"
}
}
# 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.yaml"
mv
"
${
dst_dir
}
/dns/kube-dns.yaml.in"
"
${
kubedns_file
}
"
mv
"
${
dst_dir
}
/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
$(
echo
"
$CUSTOM_KUBE_DNS_YAML
"
)
$(
echo
"
$CUSTOM_KUBE_DNS_YAML
"
)
EOF
EOF
update-prometheus-to-sd-parameters
${
kubedns_file
}
update-prometheus-to-sd-parameters
${
kubedns_file
}
fi
fi
# Replace the salt configurations with variable values.
# Replace the salt configurations with variable values.
sed
-i
-e
"s@{{ *pillar
\[
'dns_domain'
\]
*}}@
${
DNS_DOMAIN
}
@g"
"
${
kubedns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_domain'
\]
*}}@
${
DNS_DOMAIN
}
@g"
"
${
kubedns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_server'
\]
*}}@
${
DNS_SERVER_IP
}
@g"
"
${
kubedns_file
}
"
sed
-i
-e
"s@{{ *pillar
\[
'dns_server'
\]
*}}@
${
DNS_SERVER_IP
}
@g"
"
${
kubedns_file
}
"
if
[[
"
${
ENABLE_DNS_HORIZONTAL_AUTOSCALER
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_DNS_HORIZONTAL_AUTOSCALER
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns-horizontal-autoscaler"
setup-addon-manifests
"addons"
"dns-horizontal-autoscaler"
fi
fi
}
}
# Prepares the manifests of k8s addons, and starts the addon manager.
# Prepares the manifests of k8s addons, and starts the addon manager.
...
...
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