kubernetes: Expose VM parameters as envvars in boot.sh

Allows users to override.

I debated separate master and node options but decided not for now.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2017-07-24 12:26:02 +01:00
parent 54ddde0d43
commit 62aa9248a4

View File

@ -1,4 +1,8 @@
#!/bin/bash -eu
: ${KUBE_PORT_BASE:=2222}
: ${KUBE_VCPUS:=2}
: ${KUBE_MEM:=4096}
: ${KUBE_DISK:=4G}
: ${KUBE_RUN_ARGS:=}
if [ $# -eq 0 ] ; then
img="kube-master"
@ -31,4 +35,4 @@ else
fi
set -x
rm -rf "${state}"
../../bin/linuxkit run ${KUBE_RUN_ARGS} -cpus 2 -mem 4096 -state "${state}" -disk size=4G -data "${data}" "${img}"
../../bin/linuxkit run ${KUBE_RUN_ARGS} -cpus ${KUBE_VCPUS} -mem ${KUBE_MEM} -state "${state}" -disk size=${KUBE_DISK} -data "${data}" "${img}"