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
28a8c13c
Commit
28a8c13c
authored
May 26, 2015
by
CJ Cullen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix detect-minion-names for gke provider
parent
c312d823
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
config-common.sh
cluster/gke/config-common.sh
+0
-1
util.sh
cluster/gke/util.sh
+8
-9
No files found.
cluster/gke/config-common.sh
View file @
28a8c13c
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
MASTER_NAME
=
"k8s-
${
CLUSTER_NAME
}
-master"
MASTER_NAME
=
"k8s-
${
CLUSTER_NAME
}
-master"
ZONE
=
"
${
ZONE
:-
us
-central1-f
}
"
ZONE
=
"
${
ZONE
:-
us
-central1-f
}
"
NUM_MINIONS
=
"
${
NUM_MINIONS
:-
2
}
"
NUM_MINIONS
=
"
${
NUM_MINIONS
:-
2
}
"
MINION_NAMES
=(
$(
eval echo
"k8s-
${
CLUSTER_NAME
}
-node-{1..
${
NUM_MINIONS
}
}"
)
)
CLUSTER_API_VERSION
=
"
${
CLUSTER_API_VERSION
:-}
"
CLUSTER_API_VERSION
=
"
${
CLUSTER_API_VERSION
:-}
"
# TODO(mbforbes): Actually plumb this through; this currently only works
# TODO(mbforbes): Actually plumb this through; this currently only works
# because we use the 'default' network by default.
# because we use the 'default' network by default.
...
...
cluster/gke/util.sh
View file @
28a8c13c
...
@@ -217,12 +217,12 @@ function detect-master() {
...
@@ -217,12 +217,12 @@ function detect-master() {
}
}
# Assumed vars:
# Assumed vars:
# NUM_MINIONS
# none
# CLUSTER_NAME
# Vars set:
# Vars set:
#
(none)
#
MINION_NAMES
function
detect-minions
()
{
function
detect-minions
()
{
echo
"... in detect-minions()"
>
&2
echo
"... in detect-minions()"
>
&2
detect-minion-names
}
}
# Detect minions created in the minion group
# Detect minions created in the minion group
...
@@ -233,12 +233,11 @@ function detect-minions() {
...
@@ -233,12 +233,11 @@ function detect-minions() {
# MINION_NAMES
# MINION_NAMES
function
detect-minion-names
{
function
detect-minion-names
{
detect-project
detect-project
export
MINION_NAMES
=
""
GROUP_NAME
=(
$(
gcloud preview
--project
"
${
PROJECT
}
"
instance-groups
\
count
=
$(
"
${
GCLOUD
}
"
alpha container clusters describe
--project
=
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
"
${
CLUSTER_NAME
}
"
|
grep
numNodes |
cut
-f
2
-d
' '
)
--zone
"
${
ZONE
}
"
list |
grep
-o
"k8s-
${
CLUSTER_NAME
}
-.
\{
8
\}
-group"
)
)
for
x
in
$(
seq
1
$count
)
;
do
MINION_NAMES
=(
$(
gcloud preview
--project
"
${
PROJECT
}
"
instance-groups
\
export
MINION_NAMES
=
"
${
MINION_NAMES
}
k8s-
${
CLUSTER_NAME
}
-node-
${
x
}
"
;
--zone
"
${
ZONE
}
"
instances
--group
"
${
GROUP_NAME
}
"
list
\
done
|
cut
-d
'/'
-f11
)
)
MINION_NAMES
=(
${
MINION_NAMES
}
)
echo
"MINION_NAMES=
${
MINION_NAMES
[*]
}
"
echo
"MINION_NAMES=
${
MINION_NAMES
[*]
}
"
}
}
...
...
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