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
a8a51eae
Commit
a8a51eae
authored
Oct 25, 2017
by
shiliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move hardcoded constants to the beginning of the script.
parent
7e31e70a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
configure.sh
cluster/gce/gci/configure.sh
+13
-6
No files found.
cluster/gce/gci/configure.sh
View file @
a8a51eae
...
@@ -23,6 +23,14 @@ set -o errexit
...
@@ -23,6 +23,14 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
### Hardcoded constants
DEFAULT_CNI_VERSION
=
"v0.6.0"
DEFAULT_CNI_SHA1
=
"d595d3ded6499a64e8dac02466e2f5f2ce257c9f"
DEFAULT_NPD_VERSION
=
"v0.4.1"
DEFAULT_NPD_SHA1
=
"a57a3fe64cab8a18ec654f5cef0aec59dae62568"
DEFAULT_MOUNTER_TAR_SHA
=
"8003b798cf33c7f91320cd6ee5cec4fa22244571"
###
function
set-broken-motd
{
function
set-broken-motd
{
cat
>
/etc/motd
<<
EOF
cat
>
/etc/motd
<<
EOF
Broken (or in progress) Kubernetes node setup! Check the cluster initialization status
Broken (or in progress) Kubernetes node setup! Check the cluster initialization status
...
@@ -122,7 +130,7 @@ function split-commas {
...
@@ -122,7 +130,7 @@ function split-commas {
function
install-gci-mounter-tools
{
function
install-gci-mounter-tools
{
CONTAINERIZED_MOUNTER_HOME
=
"
${
KUBE_HOME
}
/containerized_mounter"
CONTAINERIZED_MOUNTER_HOME
=
"
${
KUBE_HOME
}
/containerized_mounter"
local
-r
mounter_tar_sha
=
"
8003b798cf33c7f91320cd6ee5cec4fa22244571
"
local
-r
mounter_tar_sha
=
"
${
DEFAULT_MOUNTER_TAR_SHA
}
"
if
is-preloaded
"mounter"
"
${
mounter_tar_sha
}
"
;
then
if
is-preloaded
"mounter"
"
${
mounter_tar_sha
}
"
;
then
echo
"mounter is preloaded."
echo
"mounter is preloaded."
return
return
...
@@ -147,8 +155,8 @@ function install-node-problem-detector {
...
@@ -147,8 +155,8 @@ function install-node-problem-detector {
local
-r
npd_version
=
"
${
NODE_PROBLEM_DETECTOR_VERSION
}
"
local
-r
npd_version
=
"
${
NODE_PROBLEM_DETECTOR_VERSION
}
"
local
-r
npd_sha1
=
"
${
NODE_PROBLEM_DETECTOR_TAR_HASH
}
"
local
-r
npd_sha1
=
"
${
NODE_PROBLEM_DETECTOR_TAR_HASH
}
"
else
else
local
-r
npd_version
=
"
v0.4.1
"
local
-r
npd_version
=
"
${
DEFAULT_NPD_VERSION
}
"
local
-r
npd_sha1
=
"
a57a3fe64cab8a18ec654f5cef0aec59dae62568
"
local
-r
npd_sha1
=
"
${
DEFAULT_NPD_SHA1
}
"
fi
fi
if
is-preloaded
"node-problem-detector"
"
${
npd_sha1
}
"
;
then
if
is-preloaded
"node-problem-detector"
"
${
npd_sha1
}
"
;
then
...
@@ -170,9 +178,8 @@ function install-node-problem-detector {
...
@@ -170,9 +178,8 @@ function install-node-problem-detector {
}
}
function
install-cni-binaries
{
function
install-cni-binaries
{
local
-r
cni_version
=
"v0.6.0"
local
-r
cni_tar
=
"cni-plugins-amd64-
${
DEFAULT_CNI_VERSION
}
.tgz"
local
-r
cni_tar
=
"cni-plugins-amd64-
${
cni_version
}
.tgz"
local
-r
cni_sha1
=
"
${
DEFAULT_CNI_SHA1
}
"
local
-r
cni_sha1
=
"d595d3ded6499a64e8dac02466e2f5f2ce257c9f"
if
is-preloaded
"
${
cni_tar
}
"
"
${
cni_sha1
}
"
;
then
if
is-preloaded
"
${
cni_tar
}
"
"
${
cni_sha1
}
"
;
then
echo
"
${
cni_tar
}
is preloaded."
echo
"
${
cni_tar
}
is preloaded."
return
return
...
...
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