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
0f60aba7
Commit
0f60aba7
authored
Dec 13, 2016
by
Jerzy Szczepkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed validation of multizone cluster for GCE.
Fixed validation of multizone cluster for GCE: taking actual number of worker nodes.
parent
ad1c60da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
validate-cluster.sh
cluster/validate-cluster.sh
+10
-0
No files found.
cluster/validate-cluster.sh
View file @
0f60aba7
...
...
@@ -51,6 +51,15 @@ ALLOWED_NOTREADY_NODES="${ALLOWED_NOTREADY_NODES:-0}"
CLUSTER_READY_ADDITIONAL_TIME_SECONDS
=
"
${
CLUSTER_READY_ADDITIONAL_TIME_SECONDS
:-
30
}
"
EXPECTED_NUM_NODES
=
"
${
NUM_NODES
}
"
if
[[
"
${
KUBERNETES_PROVIDER
:-}
"
==
"gce"
]]
;
then
# In multizone mode we need to add instances for all nodes in the region.
if
[[
"
${
MULTIZONE
:-}
"
==
"true"
]]
;
then
EXPECTED_NUM_NODES
=
$(
gcloud compute instances list
--format
=[
no-heading]
--regexp
=
"
${
NODE_INSTANCE_PREFIX
}
.*"
\
--zones
=
$(
gcloud compute zones list
--filter
=
region
=
europe-west1
--format
=[
no-heading]
\(
name
\)
|
tr
"
\n
"
","
|
sed
"s/,
$/
/"
)
|
wc
-l
)
fi
fi
if
[[
"
${
REGISTER_MASTER_KUBELET
:-}
"
==
"true"
]]
;
then
if
[[
"
${
KUBERNETES_PROVIDER
:-}
"
==
"gce"
]]
;
then
NUM_MASTERS
=
$(
get-master-replicas-count
)
...
...
@@ -59,6 +68,7 @@ if [[ "${REGISTER_MASTER_KUBELET:-}" == "true" ]]; then
fi
EXPECTED_NUM_NODES
=
$((
EXPECTED_NUM_NODES+NUM_MASTERS
))
fi
REQUIRED_NUM_NODES
=
$((
EXPECTED_NUM_NODES
-
ALLOWED_NOTREADY_NODES
))
# Make several attempts to deal with slow cluster birth.
return_value
=
0
...
...
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