From 703f8fb06d8c378beba5069017a8f301345034d0 Mon Sep 17 00:00:00 2001 From: Kuralamudhan Ramakrishnan Date: Wed, 30 Oct 2019 09:38:23 -0700 Subject: Bug fixes to containerized installer script Issue-ID: MULTICLOUD-905 Co-authored-by: Itohan Ukponmwan Signed-off-by: Kuralamudhan Ramakrishnan Change-Id: Ie9710146d4764f6b1f8ce11af9b28988131d75c8 --- kud/hosting_providers/containerized/installer.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'kud/hosting_providers/containerized') diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh index 52fe6279..60bc6c3a 100755 --- a/kud/hosting_providers/containerized/installer.sh +++ b/kud/hosting_providers/containerized/installer.sh @@ -100,7 +100,14 @@ function install_k8s { # install_addons() - Install Kubenertes AddOns function install_addons { - local plugins_name=$1 + if [ ${1:+1} ]; then + local plugins_name=$1 + echo "additional addons plugins $1" + else + local plugins_name="" + echo "no additional addons pluigns" + fi + source /etc/environment echo "Installing Kubernetes AddOns" ansible-galaxy install $verbose -r \ @@ -189,7 +196,13 @@ function install_pkg { function install_cluster { install_k8s $1 - install_addons $2 + if [ ${2:+1} ]; then + echo "install default addons and $2" + install_addons $2 + else + install_addons + fi + echo "installed the addons" if ${KUD_PLUGIN_ENABLED:-false}; then install_plugin @@ -254,7 +267,7 @@ if [ "$1" == "--cluster" ]; then cp $kud_multi_cluster_path/$cluster_name/hosts.ini $kud_inventory_folder/ cp -rf $kud_folder/inventory/group_vars $kud_inventory_folder/ - if [ -n "$3" ]; then + if [ ${3:+1} ]; then if [ "$3" == "--plugins" ]; then if [ -z "${4-}" ]; then echo "Error: plugins arguments is null; Refer the usage" -- cgit 1.2.3-korg