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.
#!/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}"
