diff options
author | Ritu Sood <ritu.sood@intel.com> | 2021-10-22 17:08:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-10-22 17:08:02 +0000 |
commit | a6729589f63719580a404513db4846b98c16b455 (patch) | |
tree | a1628db2396f7d7d7601a65232e3cfe7c0150672 /kud/tests/_functions.sh | |
parent | b02ac53a7b6a4b750c542f8d07639751a2eb61ba (diff) | |
parent | 988ebcf24c7d854a4053437b69cfb120acb8039c (diff) |
Merge "Allow KuD installer to specify Kubespray 2.14.1 or 2.16.0"
Diffstat (limited to 'kud/tests/_functions.sh')
-rwxr-xr-x | kud/tests/_functions.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kud/tests/_functions.sh b/kud/tests/_functions.sh index ec415409..367888e5 100755 --- a/kud/tests/_functions.sh +++ b/kud/tests/_functions.sh @@ -29,9 +29,12 @@ function print_msg { echo -e "${RED} $msg ---------------------------------------${NC}" } +function control_plane_ip { + kubectl get endpoints kubernetes -o jsonpath='{.subsets[].addresses[].ip}' +} + function ssh_cluster { - master_ip=$(kubectl cluster-info | grep "Kubernetes master" | awk -F '[:/]' '{print $4}') - ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${master_ip} -- "$@" + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $(control_plane_ip) -- "$@" } function get_ovn_central_address { |