Skip to content

Commit

Permalink
Add possibility to overwrite all variables by env var
Browse files Browse the repository at this point in the history
Some variables like LOG_FILE is hardcoded and can not be overwrite.
This commit causes each of the variables to be overwritten.
  • Loading branch information
danpawlik authored and praveenkumar committed Jul 8, 2024
1 parent eac7dcf commit 152546b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/bundle/setup/clustersetup.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/bin/bash
#CONST
export KUBECONFIG="/opt/kubeconfig"
LOG_PATH="/tmp"
LOG_FILE="$LOG_PATH/_RANDOM_SUFFIX_.log"
DNSMASQ_CONF="/etc/dnsmasq.d/crc-dnsmasq.conf"
CLUSTER_HEALTH_SLEEP=8
CLUSTER_HEALTH_RETRIES=500
STEPS_SLEEP_TIME=10
KUBECONFIG="/opt/kubeconfig"
LOG_PATH="${LOG_PATH:-"/tmp"}"
LOG_FILE="${LOG_FILE:-"$LOG_PATH/_RANDOM_SUFFIX_.log"}"
DNSMASQ_CONF="${DNSMASQ_CONF:-"/etc/dnsmasq.d/crc-dnsmasq.conf"}"
CLUSTER_HEALTH_SLEEP="${CLUSTER_HEALTH_SLEEP:-8}"
CLUSTER_HEALTH_RETRIES="${CLUSTER_HEALTH_RETRIES:-500}"
STEPS_SLEEP_TIME="${STEPS_SLEEP_TIME:-10}"
#REPLACED VARS
IIP="${IIP:-"_IIP_"}"
EIP="${EIP:-"_EIP_"}"
PULL_SECRET="${PULL_SECRET:-"_PULL_SECRET_"}"
PASS_DEVELOPER="${PASS_DEVELOPER:-"_PASS_DEVELOPER_"}"
PASS_KUBEADMIN="${PASS_KUBEADMIN:-"_PASS_KUBEADMIN_"}"
PASS_REDHAT="${PASS_REDHAT:-"_PASS_REDHAT_"}"
MAXIMUM_LOGIN_RETRY=500
MAXIMUM_LOGIN_RETRY="${MAXIMUM_LOGIN_RETRY:-500}"

pr_info() {
echo "[INF] $1" | tee -a $LOG_FILE > /dev/null
Expand Down

0 comments on commit 152546b

Please sign in to comment.