Skip to content

Commit

Permalink
Set MASTER_INTERNAL_IP env in kubemark tests.
Browse files Browse the repository at this point in the history
This env will be needed by the clusterloader2 to monitor kubemark master.

Ref. kubernetes/perf-tests#503
  • Loading branch information
mm4tt committed Apr 18, 2019
1 parent 8fb3694 commit 51970ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions kubetest/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,20 @@ func kubemarkUp(dump string, o options, deploy deployer) error {
return err
}

masterInternalIP, err := control.Output(exec.Command(
"gcloud", "compute", "instances", "describe",
os.Getenv("MASTER_NAME"),
"--project="+o.gcpProject,
"--zone="+o.gcpZone,
"--format=value(networkInterfaces[0].networkIP)"))
if err != nil {
return fmt.Errorf("failed to get masterInternalIP: %v", err)
}
// MASTER_INTERNAL_IP variable is needed by the clusterloader2 when running on kubemark clusters.
if err := os.Setenv("MASTER_INTERNAL_IP", strings.TrimSpace(string(masterInternalIP))); err != nil {
return err
}

cwd, err := os.Getwd()
if err != nil {
return err
Expand Down

0 comments on commit 51970ab

Please sign in to comment.