mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
kubernetes: avoid OS specifics in boot.sh
Remove `-publish` (which is currently Linux/QEMU specific) and replace with a generic $KUBE_RUN_ARGS envvar. Usage: KUBE_RUN_ARGS="-publish 2222:22" ./boot.sh KUBE_PORT_BASE is thus obsolete and removed. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
09609bc6ce
commit
54ddde0d43
@ -1,8 +1,7 @@
|
||||
#!/bin/bash -eu
|
||||
: ${KUBE_PORT_BASE:=2222}
|
||||
: ${KUBE_RUN_ARGS:=}
|
||||
if [ $# -eq 0 ] ; then
|
||||
img="kube-master"
|
||||
port=${KUBE_PORT_BASE}
|
||||
data=""
|
||||
state="kube-master-state"
|
||||
elif [ $# -gt 1 ] ; then
|
||||
@ -19,7 +18,6 @@ elif [ $# -gt 1 ] ; then
|
||||
esac
|
||||
img="kube-node"
|
||||
name="node-${1}"
|
||||
port=$((${KUBE_PORT_BASE} + $1))
|
||||
shift
|
||||
data="${*}"
|
||||
state="kube-${name}-state"
|
||||
@ -33,4 +31,4 @@ else
|
||||
fi
|
||||
set -x
|
||||
rm -rf "${state}"
|
||||
../../bin/linuxkit run -publish $port:22 -cpus 2 -mem 4096 -state "${state}" -disk size=4G -data "${data}" "${img}"
|
||||
../../bin/linuxkit run ${KUBE_RUN_ARGS} -cpus 2 -mem 4096 -state "${state}" -disk size=4G -data "${data}" "${img}"
|
||||
|
Loading…
Reference in New Issue
Block a user