Repository: grafana/k6-operator
Pull request #62 (2021-08-10 13:30:16)

fix: update images to use ones with scuttle
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>


Patch:
diff --git a/pkg/resources/jobs/runner.go b/pkg/resources/jobs/runner.go
index 319d78e..e2c9d55 100644
--- a/pkg/resources/jobs/runner.go
+++ b/pkg/resources/jobs/runner.go
@@ -73,7 +73,7 @@ func NewRunnerJob(k6 *v1alpha1.K6, index int) (*batchv1.Job, error) {
 
 	var zero int64 = 0
 
-	image := "loadimpact/k6:latest"
+	image := "ghcr.io/grafana/operator:latest-runner"
 	if k6.Spec.Runner.Image != "" {
 		image = k6.Spec.Runner.Image
 	}
diff --git a/pkg/resources/jobs/starter.go b/pkg/resources/jobs/starter.go
index ca4aab8..fb9bb2e 100644
--- a/pkg/resources/jobs/starter.go
+++ b/pkg/resources/jobs/starter.go
@@ -19,10 +19,11 @@ func NewStarterJob(k6 *v1alpha1.K6, hostname []string) *batchv1.Job {
 		starterAnnotations = k6.Spec.Starter.Metadata.Annotations
 	}
 
-	starterImage := "radial/busyboxplus:curl"
+	starterImage := "ghcr.io/grafana/operator:latest-starter"
 	if k6.Spec.Starter.Image != "" {
 		starterImage = k6.Spec.Starter.Image
 	}
+
 	starterLabels := newLabels(k6.Name)
 	if k6.Spec.Starter.Metadata.Labels != nil {
 		for k, v := range k6.Spec.Starter.Metadata.Labels { // Order not specified


Test patch:
diff --git a/pkg/resources/jobs/runner_test.go b/pkg/resources/jobs/runner_test.go
index db7035a..632947d 100644
--- a/pkg/resources/jobs/runner_test.go
+++ b/pkg/resources/jobs/runner_test.go
@@ -266,7 +266,7 @@ func TestNewRunnerJob(t *testing.T) {
 					ServiceAccountName:           "default",
 					AutomountServiceAccountToken: &automountServiceAccountToken,
 					Containers: []corev1.Container{{
-						Image:   "loadimpact/k6:latest",
+						Image:   "ghcr.io/grafana/operator:latest-runner",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
 						Env: []corev1.EnvVar{
@@ -373,7 +373,7 @@ func TestNewRunnerJobNoisy(t *testing.T) {
 					ServiceAccountName:           "default",
 					AutomountServiceAccountToken: &automountServiceAccountToken,
 					Containers: []corev1.Container{{
-						Image:   "loadimpact/k6:latest",
+						Image:   "ghcr.io/grafana/operator:latest-runner",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
 						Env: []corev1.EnvVar{
@@ -481,7 +481,7 @@ func TestNewRunnerJobUnpaused(t *testing.T) {
 					ServiceAccountName:           "default",
 					AutomountServiceAccountToken: &automountServiceAccountToken,
 					Containers: []corev1.Container{{
-						Image:   "loadimpact/k6:latest",
+						Image:   "ghcr.io/grafana/operator:latest-runner",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "/test/test.js", "--address=0.0.0.0:6565"},
 						Env: []corev1.EnvVar{
@@ -589,7 +589,7 @@ func TestNewRunnerJobArguments(t *testing.T) {
 					ServiceAccountName:           "default",
 					AutomountServiceAccountToken: &automountServiceAccountToken,
 					Containers: []corev1.Container{{
-						Image:   "loadimpact/k6:latest",
+						Image:   "ghcr.io/grafana/operator:latest-runner",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "--cool-thing", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
 						Env: []corev1.EnvVar{
@@ -698,7 +698,7 @@ func TestNewRunnerJobServiceAccount(t *testing.T) {
 					ServiceAccountName:           "test",
 					AutomountServiceAccountToken: &automountServiceAccountToken,
 					Containers: []corev1.Container{{
-						Image:   "loadimpact/k6:latest",
+						Image:   "ghcr.io/grafana/operator:latest-runner",
 						Name:    "k6",
 						Command: []string{"scuttle", "k6", "run", "--quiet", "/test/test.js", "--address=0.0.0.0:6565", "--paused"},
 						Env: []corev1.EnvVar{