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
24b06d80
Commit
24b06d80
authored
Feb 03, 2016
by
Warren Strange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add preemtible option to master
parent
b2600a65
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
2 deletions
+17
-2
config-default.sh
cluster/gce/config-default.sh
+2
-0
config-test.sh
cluster/gce/config-test.sh
+2
-0
helper.sh
cluster/gce/coreos/helper.sh
+7
-1
helper.sh
cluster/gce/debian/helper.sh
+6
-1
No files found.
cluster/gce/config-default.sh
View file @
24b06d80
...
...
@@ -27,6 +27,8 @@ NODE_DISK_TYPE=${NODE_DISK_TYPE:-pd-standard}
NODE_DISK_SIZE
=
${
NODE_DISK_SIZE
:-
100GB
}
REGISTER_MASTER_KUBELET
=
${
REGISTER_MASTER
:-
true
}
PREEMPTIBLE_NODE
=
${
PREEMPTIBLE_NODE
:-
false
}
PREEMPTIBLE_MASTER
=
${
PREEMPTIBLE_MASTER
:-
false
}
OS_DISTRIBUTION
=
${
KUBE_OS_DISTRIBUTION
:-
debian
}
MASTER_IMAGE
=
${
KUBE_GCE_MASTER_IMAGE
:-
container
-vm-v20160127
}
...
...
cluster/gce/config-test.sh
View file @
24b06d80
...
...
@@ -28,6 +28,8 @@ NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB}
REGISTER_MASTER_KUBELET
=
${
REGISTER_MASTER
:-
false
}
KUBE_APISERVER_REQUEST_TIMEOUT
=
300
PREEMPTIBLE_NODE
=
${
PREEMPTIBLE_NODE
:-
false
}
PREEMPTIBLE_MASTER
=
${
PREEMPTIBLE_MASTER
:-
false
}
OS_DISTRIBUTION
=
${
KUBE_OS_DISTRIBUTION
:-
debian
}
MASTER_IMAGE
=
${
KUBE_GCE_MASTER_IMAGE
:-
container
-vm-v20160127
}
...
...
cluster/gce/coreos/helper.sh
View file @
24b06d80
...
...
@@ -46,6 +46,11 @@ function create-master-instance() {
local
address_opt
=
""
[[
-n
${
1
:-}
]]
&&
address_opt
=
"--address
${
1
}
"
local
preemptible_master
=
""
if
[[
"
${
PREEMPTIBLE_MASTER
}
"
==
"true"
]]
;
then
preemptible_master
=
"--preemptible --maintenance-policy TERMINATE"
fi
write-master-env
gcloud compute instances create
"
${
MASTER_NAME
}
"
\
${
address_opt
}
\
...
...
@@ -60,5 +65,6 @@ function create-master-instance() {
--can-ip-forward
\
--metadata-from-file
\
"kube-env=
${
KUBE_TEMP
}
/master-kube-env.yaml,user-data=
${
KUBE_ROOT
}
/cluster/gce/coreos/master.yaml,configure-node=
${
KUBE_ROOT
}
/cluster/gce/coreos/configure-node.sh,configure-kubelet=
${
KUBE_ROOT
}
/cluster/gce/coreos/configure-kubelet.sh"
\
--disk
"name=
${
MASTER_NAME
}
-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
--disk
"name=
${
MASTER_NAME
}
-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
\
${
preemptible_master
}
}
cluster/gce/debian/helper.sh
View file @
24b06d80
...
...
@@ -33,6 +33,10 @@
function
create-master-instance
{
local
address_opt
=
""
[[
-n
${
1
:-}
]]
&&
address_opt
=
"--address
${
1
}
"
local
preemptible_master
=
""
if
[[
"
${
PREEMPTIBLE_MASTER
}
"
==
"true"
]]
;
then
preemptible_master
=
"--preemptible --maintenance-policy TERMINATE"
fi
write-master-env
gcloud compute instances create
"
${
MASTER_NAME
}
"
\
...
...
@@ -48,7 +52,8 @@ function create-master-instance {
--can-ip-forward
\
--metadata-from-file
\
"startup-script=
${
KUBE_ROOT
}
/cluster/gce/configure-vm.sh,kube-env=
${
KUBE_TEMP
}
/master-kube-env.yaml"
\
--disk
"name=
${
MASTER_NAME
}
-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
--disk
"name=
${
MASTER_NAME
}
-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
\
${
preemptible_master
}
}
# $1: template name (required)
...
...
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