Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #49 from turip/fix-log-dir
Browse files Browse the repository at this point in the history
Do not fail if logs folder does not exists
  • Loading branch information
rimusz authored May 15, 2019
2 parents a77f505 + 8bf9016 commit 4094337
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/tiller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,24 @@ create_ns() {
fi
}
tiller_ensure_log_dir() {
LOG_DIR="${HELM_TILLER_LOGS_DIR%/*}"
if [[ ! -d "${LOG_DIR}" ]]; then
echo "Creating folder ${LOG_DIR} for saving tiller logs into ${HELM_TILLER_LOGS_DIR}"
mkdir -p ${LOG_DIR}
fi
}
tiller_env() {
if [[ "${HELM_TILLER_SILENT}" == "false" ]]; then
echo "Starting Tiller..."
fi
if [[ "${HELM_TILLER_LOGS}" == "true" ]]; then
export HELM_TILLER_LOGS_DIR="$HELM_PLUGIN_DIR/logs/tiller.logs"
if [[ -z "${HELM_TILLER_LOGS_DIR:-}" ]]; then
HELM_TILLER_LOGS_DIR="$HELM_PLUGIN_DIR/logs/tiller.logs"
fi
export HELM_TILLER_LOGS_DIR
tiller_ensure_log_dir
fi
}
Expand Down

0 comments on commit 4094337

Please sign in to comment.