docs/k8s: set statedir to /tmp when not specified

This makes `tailscale cert` and Taildrop work on k8s and in ephemeral
mode.

Signed-off-by: Maisem Ali <maisem@tailscale.com>
pull/5087/head
Maisem Ali 2 years ago committed by Maisem Ali
parent 469c30c33b
commit bd4b27753e

@ -23,11 +23,11 @@ set -e
TAILSCALED_ARGS="--socket=/tmp/tailscaled.sock" TAILSCALED_ARGS="--socket=/tmp/tailscaled.sock"
if [[ ! -z "${KUBERNETES_SERVICE_HOST}" ]]; then if [[ ! -z "${KUBERNETES_SERVICE_HOST}" ]]; then
TAILSCALED_ARGS="${TAILSCALED_ARGS} --state=kube:${TS_KUBE_SECRET}" TAILSCALED_ARGS="${TAILSCALED_ARGS} --state=kube:${TS_KUBE_SECRET} --statedir=${TS_STATE_DIR:-/tmp}"
elif [[ ! -z "${TS_STATE_DIR}" ]]; then elif [[ ! -z "${TS_STATE_DIR}" ]]; then
TAILSCALED_ARGS="${TAILSCALED_ARGS} --statedir=${TS_STATE_DIR}" TAILSCALED_ARGS="${TAILSCALED_ARGS} --statedir=${TS_STATE_DIR}"
else else
TAILSCALED_ARGS="${TAILSCALED_ARGS} --state=mem:" TAILSCALED_ARGS="${TAILSCALED_ARGS} --state=mem: --statedir=/tmp"
fi fi
if [[ "${TS_USERSPACE}" == "true" ]]; then if [[ "${TS_USERSPACE}" == "true" ]]; then

Loading…
Cancel
Save