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
525bbfd1
Commit
525bbfd1
authored
Mar 27, 2015
by
Daniel Smith
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6103 from zmerlynn/remove_gce_node_names
Remove the --machines SaltStack configuration on GCE
parents
3bc93364
68ccb979
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
34 deletions
+6
-34
configure-vm.sh
cluster/gce/configure-vm.sh
+6
-22
util.sh
cluster/gce/util.sh
+0
-11
default
cluster/saltbase/salt/kube-controller-manager/default
+0
-1
No files found.
cluster/gce/configure-vm.sh
View file @
525bbfd1
...
@@ -73,22 +73,12 @@ for k,v in yaml.load(sys.stdin).iteritems():
...
@@ -73,22 +73,12 @@ for k,v in yaml.load(sys.stdin).iteritems():
KUBERNETES_MASTER
=
"true"
KUBERNETES_MASTER
=
"true"
fi
fi
if
[[
"
${
KUBERNETES_MASTER
}
"
==
"true"
]]
;
then
if
[[
"
${
KUBERNETES_MASTER
}
"
!=
"true"
]]
&&
[[
-z
"
${
MINION_IP_RANGE
:-}
"
]]
;
then
# TODO(zmerlynn): This block of code should disappear once #4561 & #4562 are done
# This block of code should go away once the master can allocate CIDRs
if
[[
-z
"
${
KUBERNETES_NODE_NAMES
:-}
"
]]
;
then
until
MINION_IP_RANGE
=
$(
curl-metadata node-ip-range
)
;
do
until
KUBERNETES_NODE_NAMES
=
$(
curl-metadata kube-node-names
)
;
do
echo
'Waiting for metadata MINION_IP_RANGE...'
echo
'Waiting for metadata KUBERNETES_NODE_NAMES...'
sleep
3
sleep
3
done
done
fi
else
# And this should go away once the master can allocate CIDRs
if
[[
-z
"
${
MINION_IP_RANGE
:-}
"
]]
;
then
until
MINION_IP_RANGE
=
$(
curl-metadata node-ip-range
)
;
do
echo
'Waiting for metadata MINION_IP_RANGE...'
sleep
3
done
fi
fi
fi
}
}
...
@@ -238,12 +228,6 @@ dns_server: '$(echo "$DNS_SERVER_IP" | sed -e "s/'/''/g")'
...
@@ -238,12 +228,6 @@ dns_server: '$(echo "$DNS_SERVER_IP" | sed -e "s/'/''/g")'
dns_domain: '
$(
echo
"
$DNS_DOMAIN
"
|
sed
-e
"s/'/''/g"
)
'
dns_domain: '
$(
echo
"
$DNS_DOMAIN
"
|
sed
-e
"s/'/''/g"
)
'
admission_control: '
$(
echo
"
$ADMISSION_CONTROL
"
|
sed
-e
"s/'/''/g"
)
'
admission_control: '
$(
echo
"
$ADMISSION_CONTROL
"
|
sed
-e
"s/'/''/g"
)
'
EOF
EOF
if
[[
"
${
KUBERNETES_MASTER
}
"
==
"true"
]]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
gce_node_names: '
$(
echo
"
$KUBERNETES_NODE_NAMES
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
}
}
# This should only happen on cluster initialization
# This should only happen on cluster initialization
...
...
cluster/gce/util.sh
View file @
525bbfd1
...
@@ -600,18 +600,7 @@ function kube-up {
...
@@ -600,18 +600,7 @@ function kube-up {
# command returns, but currently it returns before the instances come up due
# command returns, but currently it returns before the instances come up due
# to gcloud's deficiency.
# to gcloud's deficiency.
wait-for-minions-to-run
wait-for-minions-to-run
# Give the master an initial node list (it's waiting in
# startup). This resolves a bit of a chicken-egg issue: The minions
# need to know the master's ip, so we boot the master first. The
# master still needs to know the initial minion list (until all the
# pieces #156 are complete), so we have it wait on the minion
# boot. (The minions further wait until the loop below, where CIDRs
# get filled in.)
detect-minion-names
detect-minion-names
local
kube_node_names
kube_node_names
=
$(
IFS
=
,
;
echo
"
${
MINION_NAMES
[*]
}
"
)
add-instance-metadata
"
${
MASTER_NAME
}
"
"kube-node-names=
${
kube_node_names
}
"
# Create the routes and set IP ranges to instance metadata, 5 instances at a time.
# Create the routes and set IP ranges to instance metadata, 5 instances at a time.
for
((
i
=
0
;
i<
${#
MINION_NAMES
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i<
${#
MINION_NAMES
[@]
}
;
i++
))
;
do
...
...
cluster/saltbase/salt/kube-controller-manager/default
View file @
525bbfd1
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
{% if grains.cloud is defined -%}
{% if grains.cloud is defined -%}
{% if grains.cloud == 'gce' -%}
{% if grains.cloud == 'gce' -%}
{% set cloud_provider = "--cloud_provider=gce" -%}
{% set cloud_provider = "--cloud_provider=gce" -%}
{% set machines = "--machines=" + pillar['gce_node_names'] -%}
{% endif -%}
{% endif -%}
{% if grains.cloud == 'aws' -%}
{% if grains.cloud == 'aws' -%}
{% set cloud_provider = "--cloud_provider=aws" -%}
{% set cloud_provider = "--cloud_provider=aws" -%}
...
...
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