Replace localhost with K8s Master IP in kubeconfig 83/72983/2
authorRihab Banday <rihab.banday@ericsson.com>
Fri, 22 Oct 2021 10:26:12 +0000 (12:26 +0200)
committerRihab Banday <rihab.banday@ericsson.com>
Fri, 22 Oct 2021 11:12:18 +0000 (11:12 +0000)
This change is needed to fix the issue observed in
failing testcases as discussed on Slack.

Signed-off-by: Rihab Banday <rihab.banday@ericsson.com>
Change-Id: I8dff51883031aeed3c770b085d7c3c546942a352
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/72983
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Michael Pedersen <michaelx.pedersen@intel.com>
functions.sh

index 89c1ebb..67edf7d 100755 (executable)
@@ -310,6 +310,7 @@ copy_k8s_config() {
     # shellcheck disable=SC2087
     ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF
 scp -o StrictHostKeyChecking=no -q root@"$MASTER_IP":/root/.kube/config "${PROJECT_ROOT}"/kubeconfig
+sed -i 's/127.0.0.1/$MASTER_IP/g' "${PROJECT_ROOT}"/kubeconfig
 EOF
 
 # Copy kubeconfig from Jump VM to appropriate location in Jump Host