mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
added shell guard in case var is not set
This commit is contained in:
@@ -47,7 +47,7 @@ function create-master-instance() {
|
||||
[[ -n ${1:-} ]] && address_opt="--address ${1}"
|
||||
|
||||
local preemptible_master=""
|
||||
if [[ "${PREEMPTIBLE_MASTER}" == "true" ]]; then
|
||||
if [[ "${PREEMPTIBLE_MASTER:-}" == "true" ]]; then
|
||||
preemptible_master="--preemptible --maintenance-policy TERMINATE"
|
||||
fi
|
||||
|
||||
|
@@ -34,7 +34,7 @@ function create-master-instance {
|
||||
local address_opt=""
|
||||
[[ -n ${1:-} ]] && address_opt="--address ${1}"
|
||||
local preemptible_master=""
|
||||
if [[ "${PREEMPTIBLE_MASTER}" == "true" ]]; then
|
||||
if [[ "${PREEMPTIBLE_MASTER:-}" == "true" ]]; then
|
||||
preemptible_master="--preemptible --maintenance-policy TERMINATE"
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user