From cc302424c0b129267235157640be28b45597fef2 Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Fri, 26 Mar 2021 14:17:49 -0700 Subject: EMCO deploy of addons An example is provided with instructions on how to install the addons with emcoctl. Addtionally, the containerized installer will populate /opt/kud/addons and /opt/kud/multi-cluster/$CLUSTER_NAME/artifacts with the files and instructions necessary as well. Issue-ID: MULTICLOUD-1324 Signed-off-by: Todd Malsbary Change-Id: I74de1c9d18a0aaec4a96e38684ec80f00ab0b940 --- kud/tests/_functions.sh | 5 +++++ kud/tests/multus.sh | 4 ++-- kud/tests/sriov-network.sh | 0 3 files changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 kud/tests/sriov-network.sh (limited to 'kud/tests') diff --git a/kud/tests/_functions.sh b/kud/tests/_functions.sh index 720470eb..7a3e97ab 100755 --- a/kud/tests/_functions.sh +++ b/kud/tests/_functions.sh @@ -25,6 +25,11 @@ function print_msg { echo -e "${RED} $msg ---------------------------------------${NC}" } +function ssh_cluster { + master_ip=$(kubectl cluster-info | grep "Kubernetes master" | awk -F '[:/]' '{print $4}') + ssh -o StrictHostKeyChecking=no ${master_ip} -- "$@" +} + function get_ovn_central_address { #Reuse OVN_CENTRAL_ADDRESS if available (bypassable by --force flag) if [[ "${1:-}" != "--force" ]] && [[ -n "${OVN_CENTRAL_ADDRESS:-}" ]]; then diff --git a/kud/tests/multus.sh b/kud/tests/multus.sh index ad3a3909..4f94791f 100755 --- a/kud/tests/multus.sh +++ b/kud/tests/multus.sh @@ -41,7 +41,7 @@ NET function generate_CRD_for_macvlan_cni { local csar_id=$1 - local master_name=`route | grep 'default' | awk '{print $8}' |head -n 1` + local master_name=$(ssh_cluster route | grep 'default' | awk '{print $8}' |head -n 1) _checks_args $csar_id pushd ${CSAR_DIR}/${csar_id} @@ -67,7 +67,7 @@ NET function generate_CRD_for_ipvlan_cni { local csar_id=$1 - local master_name=`route | grep 'default' | awk '{print $8}' |head -n 1` + local master_name=$(ssh_cluster route | grep 'default' | awk '{print $8}' |head -n 1) _checks_args $csar_id pushd ${CSAR_DIR}/${csar_id} diff --git a/kud/tests/sriov-network.sh b/kud/tests/sriov-network.sh old mode 100644 new mode 100755 -- cgit 1.2.3-korg