Repository: grafana/k6-operator
Pull request #56 (2021-07-26 17:15:29)

Feat/optional-istio - Ignore the Istio process in the beginning
Added a way to ignore the scuttle inside starter and runner.

edit: Build off of #49, #53 and #54

knmsk: > Should we put the ENV variables for scuttle behind a bool as well? This would prevent unnecessary ENV or edge case interactions. But might be a big pain.
Probably it's better to create a struct for this stuff.

> Composition wise. Should we move the istio check into the helpers.go and let it return a command and env variables? So we can keep everything in the same place?
Sure, we can move into the helpers.go it makes sense!

Patch:
diff --git a/api/v1alpha1/k6_types.go b/api/v1alpha1/k6_types.go
index c2e1888..30f7807 100644
--- a/api/v1alpha1/k6_types.go
+++ b/api/v1alpha1/k6_types.go
@@ -35,6 +35,19 @@ type Pod struct {
 	ServiceAccountName           string                      `json:"serviceAccountName,omitempty"`
 }
 
+type K6Scuttle struct {
+	Enabled                 string `json:"enabled,omitempty"`
+	EnvoyAdminApi           string `json:"envoyAdminApi,omitempty"`
+	NeverKillIstio          bool   `json:"neverKillIstio,omitempty"`
+	NeverKillIstioOnFailure bool   `json:"neverKillIstioOnFailure,omitempty"`
+	ScuttleLogging          bool   `json:"scuttleLogging,omitempty"`
+	StartWithoutEnvoy       bool   `json:"startWithoutEnvoy,omitempty"`
+	WaitForEnvoyTimeout     string `json:"waitForEnvoyTimeout,omitempty"`
+	IstioQuitApi            string `json:"istioQuitApi,omitempty"`
+	GenericQuitEndpoint     string `json:"genericQuitEndpoint,omitempty"`
+	QuitWithoutEnvoyTimeout string `json:"quitWithoutEnvoyTimeout,omitempty"`
+}
+
 // K6Spec defines the desired state of K6
 type K6Spec struct {
 	Script      K6Script               `json:"script"`
@@ -46,6 +59,7 @@ type K6Spec struct {
 	Runner      Pod                    `json:"runner,omitempty"`
 	Quiet       string                 `json:"quiet,omitempty"`
 	Paused      string                 `json:"paused,omitempty"`
+	Scuttle     K6Scuttle              `json:"scuttle,omitempty"`
 	//	Cleanup     Cleanup `json:"cleanup,omitempty"` // TODO
 }
 
diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go
index b6b8381..bb28003 100644
--- a/api/v1alpha1/zz_generated.deepcopy.go
+++ b/api/v1alpha1/zz_generated.deepcopy.go
@@ -116,6 +116,21 @@ func (in *K6Script) DeepCopy() *K6Script {
 	return out
 }
 
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *K6Scuttle) DeepCopyInto(out *K6Scuttle) {
+	*out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K6Scuttle.
+func (in *K6Scuttle) DeepCopy() *K6Scuttle {
+	if in == nil {
+		return nil
+	}
+	out := new(K6Scuttle)
+	in.DeepCopyInto(out)
+	return out
+}
+
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *K6Spec) DeepCopyInto(out *K6Spec) {
 	*out = *in
@@ -127,6 +142,7 @@ func (in *K6Spec) DeepCopyInto(out *K6Spec) {
 	}
 	in.Starter.DeepCopyInto(&out.Starter)
 	in.Runner.DeepCopyInto(&out.Runner)
+	out.Scuttle = in.Scuttle
 }
 
 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K6Spec.
diff --git a/config/crd/bases/k6.io_k6s.yaml b/config/crd/bases/k6.io_k6s.yaml
index e31122a..709e916 100644
--- a/config/crd/bases/k6.io_k6s.yaml
+++ b/config/crd/bases/k6.io_k6s.yaml
@@ -857,6 +857,29 @@ spec:
                   - name
                   type: object
               type: object
+            scuttle:
+              properties:
+                enabled:
+                  type: string
+                envoyAdminApi:
+                  type: string
+                genericQuitEndpoint:
+                  type: string
+                istioQuitApi:
+                  type: string
+                neverKillIstio:
+                  type: boolean
+                neverKillIstioOnFailure:
+                  type: boolean
+                quitWithoutEnvoyTimeout:
+                  type: string
+                scuttleLogging:
+                  type: boolean
+                startWithoutEnvoy:
+                  type: boolean
+                waitForEnvoyTimeout:
+                  type: string
+              type: object
             separate:
               type: boolean
             starter:
diff --git a/pkg/resources/containers/curl.go b/pkg/resources/containers/curl.go
index ed2f793..60f24d2 100644
--- a/pkg/resources/containers/curl.go
+++ b/pkg/resources/containers/curl.go
@@ -11,7 +11,7 @@ import (
 )
 
 // NewCurlContainer is used to get a template for a new k6 starting curl container.
-func NewCurlContainer(hostnames []string, image string) corev1.Container {
+func NewCurlContainer(hostnames []string, image string, command []string, env []corev1.EnvVar) corev1.Container {
 	req, _ := json.Marshal(
 		statusAPIRequest{
 			Data: statusAPIRequestData{
@@ -27,23 +27,10 @@ func NewCurlContainer(hostnames []string, image string) corev1.Container {
 	for _, hostname := range hostnames {
 		parts = append(parts, fmt.Sprintf("curl -X PATCH -H 'Content-Type: application/json' http://%s:6565/v1/status -d '%s'", hostname, req))
 	}
-
 	return corev1.Container{
 		Name:  "k6-curl",
 		Image: image,
-		Env: []corev1.EnvVar{{
-			Name:  "ISTIO_QUIT_API",
-			Value: "http://127.0.0.1:15020",
-		},
-			{
-				Name:  "ENVOY_ADMIN_API",
-				Value: "http://localhost:15000",
-			},
-			{
-				Name:  "WAIT_FOR_ENVOY_TIMEOUT",
-				Value: "15",
-			},
-		},
+		Env:   env,
 		Resources: corev1.ResourceRequirements{
 			Requests: corev1.ResourceList{
 				corev1.ResourceCPU:    *resource.NewMilliQuantity(50, resource.DecimalSI),
@@ -53,12 +40,10 @@ func NewCurlContainer(hostnames []string, image string) corev1.Container {
 				corev1.ResourceMemory: *resource.NewQuantity(209715200, resource.BinarySI),
 			},
 		},
-		Command: []string{
-			"scuttle",
-			"sh",
-			"-c",
+		Command: append(
+			command,
 			strings.Join(parts, ";"),
-		},
+		),
 	}
 }
 
diff --git a/pkg/resources/jobs/helpers.go b/pkg/resources/jobs/helpers.go
index b12780d..a77d9dd 100644
--- a/pkg/resources/jobs/helpers.go
+++ b/pkg/resources/jobs/helpers.go
@@ -1,8 +1,111 @@
 package jobs
 
+import (
+	"strconv"
+
+	"github.com/k6io/operator/api/v1alpha1"
+	corev1 "k8s.io/api/core/v1"
+)
+
 func newLabels(name string) map[string]string {
 	return map[string]string{
 		"app":   "k6",
 		"k6_cr": name,
 	}
 }
+
+func newCommand(istioEnabled string) ([]string, bool) {
+	istio := true
+	if istioEnabled != "" {
+		istio, _ = strconv.ParseBool(istioEnabled)
+	}
+	var command []string
+
+	if istio {
+		command = append(command, "scuttle")
+	}
+	return append(command, "k6", "run"), istio
+}
+
+func newIstioEnvVar(istio v1alpha1.K6Scuttle, istioEnabled bool) []corev1.EnvVar {
+	env := []corev1.EnvVar{}
+
+	if istioEnabled {
+		var istioQuitApi string
+		var envoyAdminApi string
+		var waitForEnvoyTimeout string
+
+		if istio.EnvoyAdminApi != "" {
+			envoyAdminApi = istio.EnvoyAdminApi
+		} else {
+			envoyAdminApi = "http://127.0.0.1:15000"
+		}
+		env = append(env, corev1.EnvVar{
+			Name:  "ENVOY_ADMIN_API",
+			Value: envoyAdminApi,
+		})
+
+		if istio.IstioQuitApi != "" {
+			istioQuitApi = istio.IstioQuitApi
+		} else {
+			istioQuitApi = "http://127.0.0.1:15020"
+		}
+		env = append(env, corev1.EnvVar{
+			Name:  "ISTIO_QUIT_API",
+			Value: istioQuitApi,
+		})
+
+		if istio.WaitForEnvoyTimeout != "" {
+			waitForEnvoyTimeout = istio.WaitForEnvoyTimeout
+		} else {
+			waitForEnvoyTimeout = "15"
+		}
+		env = append(env, corev1.EnvVar{
+			Name:  "WAIT_FOR_ENVOY_TIMEOUT",
+			Value: waitForEnvoyTimeout,
+		})
+
+		if istio.NeverKillIstio {
+			env = append(env, corev1.EnvVar{
+				Name:  "NEVER_KILL_ISTIO",
+				Value: strconv.FormatBool(istio.NeverKillIstio),
+			})
+		}
+
+		if istio.NeverKillIstioOnFailure {
+			env = append(env, corev1.EnvVar{
+				Name:  "NEVER_KILL_ISTIO_ON_FAILURE",
+				Value: strconv.FormatBool(istio.NeverKillIstioOnFailure),
+			})
+		}
+
+		if istio.ScuttleLogging {
+			env = append(env, corev1.EnvVar{
+				Name:  "SCUTTLE_LOGGING",
+				Value: strconv.FormatBool(istio.ScuttleLogging),
+			})
+		}
+
+		if istio.StartWithoutEnvoy {
+			env = append(env, corev1.EnvVar{
+				Name:  "START_WITHOUT_ENVOY",
+				Value: strconv.FormatBool(istio.StartWithoutEnvoy),
+			})
+		}
+
+		if istio.GenericQuitEndpoint != "" {
+			env = append(env, corev1.EnvVar{
+				Name:  "GENERIC_QUIT_ENDPOINT",
+				Value: istio.GenericQuitEndpoint,
+			})
+		}
+
+		if istio.QuitWithoutEnvoyTimeout != "" {
+			env = append(env, corev1.EnvVar{
+				Name:  "QUIT_WITHOUT_ENVOY_TIMEOUT",
+				Value: istio.QuitWithoutEnvoyTimeout,
+			})
+		}
+	}
+	return env
+}
diff --git a/pkg/resources/jobs/runner.go b/pkg/resources/jobs/runner.go
index 55e6186..68d76d2 100644
--- a/pkg/resources/jobs/runner.go
+++ b/pkg/resources/jobs/runner.go
@@ -24,7 +24,7 @@ type Script struct {
 // NewRunnerJob creates a new k6 job from a CRD
 func NewRunnerJob(k6 *v1alpha1.K6, index int) (*batchv1.Job, error) {
 	name := fmt.Sprintf("%s-%d", k6.Name, index)
-	command := []string{"scuttle", "k6", "run"}
+	command, istioEnabled := newCommand(k6.Spec.Scuttle.Enabled)
 
 	quiet := true
 	if k6.Spec.Quiet != "" {
@@ -105,18 +105,7 @@ func NewRunnerJob(k6 *v1alpha1.K6, index int) (*batchv1.Job, error) {
 	ports := []corev1.ContainerPort{{ContainerPort: 6565}}
 	ports = append(ports, k6.Spec.Ports...)
 
-	env := []corev1.EnvVar{{
-		Name:  "ISTIO_QUIT_API",
-		Value: "http://127.0.0.1:15020",
-	}}
-	env = append(env, corev1.EnvVar{
-		Name:  "ENVOY_ADMIN_API",
-		Value: "http://127.0.0.1:15000",
-	})
-	env = append(env, corev1.EnvVar{
-		Name:  "WAIT_FOR_ENVOY_TIMEOUT",
-		Value: "15",
-	})
+	env := newIstioEnvVar(k6.Spec.Scuttle, istioEnabled)
 	env = append(env, k6.Spec.Runner.Env...)
 
 	job := &batchv1.Job{
diff --git a/pkg/resources/jobs/starter.go b/pkg/resources/jobs/starter.go
index 8fb65f8..339ec6f 100644
--- a/pkg/resources/jobs/starter.go
+++ b/pkg/resources/jobs/starter.go
@@ -39,6 +39,8 @@ func NewStarterJob(k6 *v1alpha1.K6, hostname []string) *batchv1.Job {
 	if k6.Spec.Starter.AutomountServiceAccountToken != "" {
 		automountServiceAccountToken, _ = strconv.ParseBool(k6.Spec.Starter.AutomountServiceAccountToken)
 	}
+	command, istioEnabled := newCommand(k6.Spec.Scuttle.Enabled)
+	env := newIstioEnvVar(k6.Spec.Scuttle, istioEnabled)
 	return &batchv1.Job{
 		ObjectMeta: metav1.ObjectMeta{
 			Name:        fmt.Sprintf("%s-starter", k6.Name),
@@ -59,7 +61,7 @@ func NewStarterJob(k6 *v1alpha1.K6, hostname []string) *batchv1.Job {
 					NodeSelector:                 k6.Spec.Starter.NodeSelector,
 					RestartPolicy:                corev1.RestartPolicyNever,
 					Containers: []corev1.Container{
-						containers.NewCurlContainer(hostname, starterImage),
+						containers.NewCurlContainer(hostname, starterImage, command, env),
 					},
 				},
 			},


Test patch:
diff --git a/pkg/resources/jobs/helpers_test.go b/pkg/resources/jobs/helpers_test.go
index 0bd2b3f..8fe8b83 100644
--- a/pkg/resources/jobs/helpers_test.go
+++ b/pkg/resources/jobs/helpers_test.go
@@ -3,6 +3,10 @@ package jobs
 import (
 	"reflect"
 	"testing"
+
+	"github.com/go-test/deep"
+	"github.com/k6io/operator/api/v1alpha1"
+	corev1 "k8s.io/api/core/v1"
 )
 
 func TestNewLabels(t *testing.T) {
@@ -16,3 +20,136 @@ func TestNewLabels(t *testing.T) {
 		t.Errorf("new labels were incorrect, got: %v, want: %v.", labels, expectedOutcome)
 	}
 }
+
+func TestNewCommandIfTrue(t *testing.T) {
+	expectedOutcome := []string{"scuttle", "k6", "run"}
+	command, _ := newCommand("true")
+
+	if diff := deep.Equal(expectedOutcome, command); diff != nil {
+		t.Errorf("newCommand returned unexpected data, diff: %s", diff)
+	}
+}
+
+func TestNewCommandIfFalse(t *testing.T) {
+	expectedOutcome := []string{"k6", "run"}
+	command, _ := newCommand("false")
+
+	if diff := deep.Equal(expectedOutcome, command); diff != nil {
+		t.Errorf("newCommand returned unexpected data, diff: %s", diff)
+	}
+}
+
+func TestNewIstioDefaultEnvVar(t *testing.T) {
+	expectedOutcome := []corev1.EnvVar{
+		{
+			Name:  "ENVOY_ADMIN_API",
+			Value: "http://127.0.0.1:15000",
+		},
+		{
+			Name:  "ISTIO_QUIT_API",
+			Value: "http://127.0.0.1:15020",
+		},
+		{
+			Name:  "WAIT_FOR_ENVOY_TIMEOUT",
+			Value: "15",
+		},
+	}
+
+	envVars := newIstioEnvVar(v1alpha1.K6Scuttle{
+		EnvoyAdminApi:       "",
+		IstioQuitApi:        "",
+		WaitForEnvoyTimeout: "",
+	}, true)
+
+	if !reflect.DeepEqual(envVars, expectedOutcome) {
+		t.Errorf("new envVars were incorrect, got: %v, want: %v.", envVars, expectedOutcome)
+	}
+}
+
+func TestNewIstioEnvVarVaryingTheDefault(t *testing.T) {
+
+	expectedOutcome := []corev1.EnvVar{
+		{
+			Name:  "ENVOY_ADMIN_API",
+			Value: "http://localhost:15020",
+		},
+		{
+			Name:  "ISTIO_QUIT_API",
+			Value: "http://127.17.0.1:15020",
+		},
+		{
+			Name:  "WAIT_FOR_ENVOY_TIMEOUT",
+			Value: "50",
+		},
+	}
+
+	envVars := newIstioEnvVar(v1alpha1.K6Scuttle{
+		EnvoyAdminApi:       "http://localhost:15020",
+		IstioQuitApi:        "http://127.17.0.1:15020",
+		WaitForEnvoyTimeout: "50",
+	}, true)
+
+	if !reflect.DeepEqual(envVars, expectedOutcome) {
+		t.Errorf("new envVars were incorrect, got: %v, want: %v.", envVars, expectedOutcome)
+	}
+}
+
+func TestNewIstioEnvVarTrueValues(t *testing.T) {
+	expectedOutcome := []corev1.EnvVar{
+		{
+			Name:  "ENVOY_ADMIN_API",
+			Value: "http://127.0.0.1:15000",
+		},
+		{
+			Name:  "ISTIO_QUIT_API",
+			Value: "http://127.0.0.1:15020",
+		},
+		{
+			Name:  "WAIT_FOR_ENVOY_TIMEOUT",
+			Value: "15",
+		},
+		{
+			Name:  "SCUTTLE_LOGGING",
+			Value: "true",
+		},
+	}
+
+	envVars := newIstioEnvVar(v1alpha1.K6Scuttle{
+		EnvoyAdminApi:       "",
+		IstioQuitApi:        "",
+		WaitForEnvoyTimeout: "",
+		ScuttleLogging:      true,
+	}, true)
+
+	if !reflect.DeepEqual(envVars, expectedOutcome) {
+		t.Errorf("new envVars were incorrect, got: %v, want: %v.", envVars, expectedOutcome)
+	}
+}
+
+func TestNewIstioEnvVarFalseValues(t *testing.T) {
+	expectedOutcome := []corev1.EnvVar{
+		{
+			Name:  "ENVOY_ADMIN_API",
+			Value: "http://127.0.0.1:15000",
+		},
+		{
+			Name:  "ISTIO_QUIT_API",
+			Value: "http://127.0.0.1:15020",
+		},
+		{
+			Name:  "WAIT_FOR_ENVOY_TIMEOUT",
+			Value: "15",
+		},
+	}
+
+	envVars := newIstioEnvVar(v1alpha1.K6Scuttle{
+		EnvoyAdminApi:       "",
+		IstioQuitApi:        "",
+		WaitForEnvoyTimeout: "",
+		ScuttleLogging:      false,
+	}, true)
+
+	if !reflect.DeepEqual(envVars, expectedOutcome) {
+		t.Errorf("new envVars were incorrect, got: %v, want: %v.", envVars, expectedOutcome)
+	}
+}
diff --git a/pkg/resources/jobs/runner_test.go b/pkg/resources/jobs/runner_test.go
index 2a748c6..522670d 100644
--- a/pkg/resources/jobs/runner_test.go
+++ b/pkg/resources/jobs/runner_test.go
@@ -269,14 +269,16 @@ func TestNewRunnerJob(t *testing.T) {
 						Image:   "loadimpact/k6:latest",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
-						Env: []corev1.EnvVar{{
-							Name:  "ISTIO_QUIT_API",
-							Value: "http://127.0.0.1:15020",
-						},
+						Env: []corev1.EnvVar{
 							{
 								Name:  "ENVOY_ADMIN_API",
 								Value: "http://127.0.0.1:15000",
-							}, {
+							},
+							{
+								Name:  "ISTIO_QUIT_API",
+								Value: "http://127.0.0.1:15020",
+							},
+							{
 								Name:  "WAIT_FOR_ENVOY_TIMEOUT",
 								Value: "15",
 							},
@@ -328,7 +330,6 @@ func TestNewRunnerJob(t *testing.T) {
 	}
 }
 
-
 func TestNewRunnerJobNoisy(t *testing.T) {
 	script := &Script{
 		Name: "test",
@@ -375,14 +376,16 @@ func TestNewRunnerJobNoisy(t *testing.T) {
 						Image:   "loadimpact/k6:latest",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
-						Env: []corev1.EnvVar{{
-							Name:  "ISTIO_QUIT_API",
-							Value: "http://127.0.0.1:15020",
-						},
+						Env: []corev1.EnvVar{
 							{
 								Name:  "ENVOY_ADMIN_API",
 								Value: "http://127.0.0.1:15000",
-							}, {
+							},
+							{
+								Name:  "ISTIO_QUIT_API",
+								Value: "http://127.0.0.1:15020",
+							},
+							{
 								Name:  "WAIT_FOR_ENVOY_TIMEOUT",
 								Value: "15",
 							},
@@ -481,14 +484,16 @@ func TestNewRunnerJobUnpaused(t *testing.T) {
 						Image:   "loadimpact/k6:latest",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "/test/test.js", "--address=0.0.0.0:6565"},
-						Env: []corev1.EnvVar{{
-							Name:  "ISTIO_QUIT_API",
-							Value: "http://127.0.0.1:15020",
-						},
+						Env: []corev1.EnvVar{
 							{
 								Name:  "ENVOY_ADMIN_API",
 								Value: "http://127.0.0.1:15000",
-							}, {
+							},
+							{
+								Name:  "ISTIO_QUIT_API",
+								Value: "http://127.0.0.1:15020",
+							},
+							{
 								Name:  "WAIT_FOR_ENVOY_TIMEOUT",
 								Value: "15",
 							},
@@ -587,14 +592,16 @@ func TestNewRunnerJobArguments(t *testing.T) {
 						Image:   "loadimpact/k6:latest",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "--cool-thing", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
-						Env: []corev1.EnvVar{{
-							Name:  "ISTIO_QUIT_API",
-							Value: "http://127.0.0.1:15020",
-						},
+						Env: []corev1.EnvVar{
 							{
 								Name:  "ENVOY_ADMIN_API",
 								Value: "http://127.0.0.1:15000",
-							}, {
+							},
+							{
+								Name:  "ISTIO_QUIT_API",
+								Value: "http://127.0.0.1:15020",
+							},
+							{
 								Name:  "WAIT_FOR_ENVOY_TIMEOUT",
 								Value: "15",
 							},
@@ -694,14 +701,16 @@ func TestNewRunnerJobServiceAccount(t *testing.T) {
 						Image:   "loadimpact/k6:latest",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
-						Env: []corev1.EnvVar{{
-							Name:  "ISTIO_QUIT_API",
-							Value: "http://127.0.0.1:15020",
-						},
+						Env: []corev1.EnvVar{
 							{
 								Name:  "ENVOY_ADMIN_API",
 								Value: "http://127.0.0.1:15000",
-							}, {
+							},
+							{
+								Name:  "ISTIO_QUIT_API",
+								Value: "http://127.0.0.1:15020",
+							},
+							{
 								Name:  "WAIT_FOR_ENVOY_TIMEOUT",
 								Value: "15",
 							},
diff --git a/pkg/resources/jobs/starter_test.go b/pkg/resources/jobs/starter_test.go
index 2e0e99b..dad0db7 100644
--- a/pkg/resources/jobs/starter_test.go
+++ b/pkg/resources/jobs/starter_test.go
@@ -41,13 +41,25 @@ func TestNewStarterJob(t *testing.T) {
 					},
 				},
 				Spec: corev1.PodSpec{
-					ServiceAccountName:           "default",
 					AutomountServiceAccountToken: &automountServiceAccountToken,
+					ServiceAccountName:           "default",
 					Affinity:                     nil,
 					NodeSelector:                 nil,
 					RestartPolicy:                corev1.RestartPolicyNever,
 					Containers: []corev1.Container{
-						containers.NewCurlContainer([]string{"testing"}, "image"),
+						containers.NewCurlContainer([]string{"testing"}, "image", []string{"scuttle", "k6", "run"}, []corev1.EnvVar{
+							{
+								Name:  "ENVOY_ADMIN_API",
+								Value: "http://127.0.0.1:15000",
+							},
+							{
+								Name:  "ISTIO_QUIT_API",
+								Value: "http://127.0.0.1:15020",
+							},
+							{
+								Name:  "WAIT_FOR_ENVOY_TIMEOUT",
+								Value: "15",
+							}}),
 					},
 				},
 			},