Move Initialization of variables inside if/else
Initialization of variables: KUBE_PROTOCOL and KUBE_CONFIG is done inside if/else for better readability and maintainability. Change-Id: I37dfe57cc1328f1531233d11667a020bb3e0de5b Partial-Bug: #1500850
This commit is contained in:
parent
2f30cc2952
commit
2f2971ba62
|
@ -5,11 +5,12 @@
|
|||
echo "configuring kubernetes (minion)"
|
||||
|
||||
ETCD_SERVER_IP=${ETCD_SERVER_IP:-$KUBE_MASTER_IP}
|
||||
KUBE_PROTOCOL="https"
|
||||
KUBE_CONFIG=""
|
||||
|
||||
if [ "$TLS_DISABLED" = "True" ]; then
|
||||
KUBE_PROTOCOL="http"
|
||||
KUBE_CONFIG=""
|
||||
else
|
||||
KUBE_PROTOCOL="https"
|
||||
KUBE_CONFIG="--kubeconfig=/srv/kubernetes/kubeconfig.yaml"
|
||||
fi
|
||||
KUBE_MASTER_URI="$KUBE_PROTOCOL://$KUBE_MASTER_IP:$KUBE_API_PORT"
|
||||
|
|
Loading…
Reference in New Issue