summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRihab Banday <rihab.banday@ericsson.com>2021-10-22 12:26:12 +0200
committerRihab Banday <rihab.banday@ericsson.com>2021-10-22 11:12:18 +0000
commitc38ceb59de7f5085948395c6e8c87b5eecdd02ca (patch)
treebb56d10bbefe85f09b73d10143d2dc53b9234eea
parentc21a102352899de8fb48e9e56b5f0b7a14ff41d1 (diff)
Replace localhost with K8s Master IP in kubeconfig
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>
-rwxr-xr-xfunctions.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh
index 89c1ebb..67edf7d 100755
--- a/functions.sh
+++ b/functions.sh
@@ -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