diff --git a/.github/workflows/e2e-test.yaml b/.github/workflows/e2e-test.yaml index 5cb0dcf2..d0d40901 100644 --- a/.github/workflows/e2e-test.yaml +++ b/.github/workflows/e2e-test.yaml @@ -39,7 +39,7 @@ jobs: run: | kubectl cluster-info kubectl apply -f rendered.yaml - kubectl set image deployment/k6-operator-controller-manager manager=ghcr.io/k6io/operator:${{ env.GITHUB_SHA }} --record + kubectl set image deployment/k6-operator-controller-manager manager=ghcr.io/grafana/operator:${{ env.GITHUB_SHA }} --record sleep 30 kubectl create configmap crocodile-stress-test --from-file e2e/test.js kubectl apply -f e2e/test.yaml diff --git a/Makefile b/Makefile index ec058a7e..f9a16209 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ endif BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # Image URL to use all building/pushing image targets -IMG ?= ghcr.io/k6io/operator:latest +IMG ?= ghcr.io/grafana/operator:latest # Default dockerfile to build DOCKERFILE ?= "Dockerfile.controller" # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) diff --git a/PROJECT b/PROJECT index 8785915b..bf6b126b 100644 --- a/PROJECT +++ b/PROJECT @@ -1,14 +1,14 @@ domain: io layout: go.kubebuilder.io/v2 projectName: operator -repo: github.com/k6io/operator +repo: github.com/grafana/k6-operator resources: - controller: true domain: io group: k6 kind: K6 - path: github.com/k6io/operator/api/v1alpha1 + path: github.com/grafana/k6-operator/api/v1alpha1 version: v1alpha1 version: "3" plugins: diff --git a/README.md b/README.md index 0dded6f9..f52d0fb7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ > This project is **experimental** and changes a lot between commits. > Use at your own risk. -`k6io/operator` is a kubernetes operator for running distributed k6 tests in your cluster. +`grafana/k6-operator` is a kubernetes operator for running distributed k6 tests in your cluster. Read also the [complete tutorial](https://k6.io/blog/running-distributed-tests-on-k8s/) to learn more about how to use this project. @@ -131,7 +131,7 @@ $ kubectl delete -f /path/to/your/k6-resource.yml ### Using extensions By default, the operator will use `loadimpact/k6:latest` as the container image for the test jobs. If you want to use -extensions built with [xk6](https://github.com/k6io/xk6) you'll need to create your own image and override the `image` +extensions built with [xk6](https://github.com/grafana/xk6) you'll need to create your own image and override the `image` property on the `K6` kubernetes resource. For example, the following Dockerfile can be used to create a container image using github.com/szkiba/xk6-prometheus as an extension: @@ -140,7 +140,7 @@ image using github.com/szkiba/xk6-prometheus as an extension: # Build the k6 binary with the extension FROM golang:1.16.4-buster as builder -RUN go install github.com/k6io/xk6/cmd/xk6@latest +RUN go install github.com/grafana/xk6/cmd/xk6@latest RUN xk6 build --output /k6 --with github.com/szkiba/xk6-prometheus@latest # Use the operator's base image and override the k6 binary diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 350b27f4..d087e5ca 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -3,7 +3,7 @@ resources: - manager.yaml images: - name: controller - newName: ghcr.io/k6io/operator + newName: ghcr.io/grafana/operator newTag: latest apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization diff --git a/config/manifests/bases/operator.clusterserviceversion.yaml b/config/manifests/bases/operator.clusterserviceversion.yaml index 64ff8f6e..2280cc3d 100644 --- a/config/manifests/bases/operator.clusterserviceversion.yaml +++ b/config/manifests/bases/operator.clusterserviceversion.yaml @@ -5,7 +5,7 @@ metadata: annotations: alm-examples: "[]" capabilities: Basic Install - containerImage: ghcr.io/k6io/operator + containerImage: ghcr.io/grafana/operator repository: https://github.com/grafana/k6-operator support: k6 name: k6-operator.v0.0.0 diff --git a/controllers/k6_controller.go b/controllers/k6_controller.go index 9eecff49..d4d11937 100644 --- a/controllers/k6_controller.go +++ b/controllers/k6_controller.go @@ -17,8 +17,9 @@ package controllers import ( "context" "fmt" + "github.com/go-logr/logr" - "github.com/k6io/operator/api/v1alpha1" + "github.com/grafana/k6-operator/api/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" diff --git a/controllers/k6_create.go b/controllers/k6_create.go index e8e0cfb0..a8ff0417 100644 --- a/controllers/k6_create.go +++ b/controllers/k6_create.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/go-logr/logr" - "github.com/k6io/operator/api/v1alpha1" - "github.com/k6io/operator/pkg/resources/jobs" + "github.com/grafana/k6-operator/api/v1alpha1" + "github.com/grafana/k6-operator/pkg/resources/jobs" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" diff --git a/controllers/k6_start.go b/controllers/k6_start.go index 813d379f..4024cb26 100644 --- a/controllers/k6_start.go +++ b/controllers/k6_start.go @@ -6,8 +6,8 @@ import ( "time" "github.com/go-logr/logr" - "github.com/k6io/operator/api/v1alpha1" - "github.com/k6io/operator/pkg/resources/jobs" + "github.com/grafana/k6-operator/api/v1alpha1" + "github.com/grafana/k6-operator/pkg/resources/jobs" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 1d1129ca..6034144e 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -28,7 +28,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - k6v1alpha1 "github.com/k6io/operator/api/v1alpha1" + k6v1alpha1 "github.com/grafana/k6-operator/api/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/go.mod b/go.mod index 4da9eee6..4b1d1e01 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ -module github.com/k6io/operator +module github.com/grafana/k6-operator go 1.13 require ( github.com/go-logr/logr v0.1.0 - github.com/go-test/deep v1.0.7 // indirect + github.com/go-test/deep v1.0.7 github.com/onsi/ginkgo v1.12.1 github.com/onsi/gomega v1.10.1 k8s.io/api v0.18.6 @@ -13,4 +13,4 @@ require ( sigs.k8s.io/controller-runtime v0.6.2 ) -replace github.com/k6io/operator => ./ +replace github.com/grafana/k6-operator => ./ diff --git a/main.go b/main.go index 49582c0c..46e906da 100644 --- a/main.go +++ b/main.go @@ -18,9 +18,10 @@ package main import ( "flag" - "github.com/k6io/operator/controllers" "os" + "github.com/grafana/k6-operator/controllers" + "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" @@ -28,7 +29,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log/zap" - k6v1alpha1 "github.com/k6io/operator/api/v1alpha1" + k6v1alpha1 "github.com/grafana/k6-operator/api/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/pkg/resources/jobs/helpers.go b/pkg/resources/jobs/helpers.go index a77d9dd1..019d3b65 100644 --- a/pkg/resources/jobs/helpers.go +++ b/pkg/resources/jobs/helpers.go @@ -3,7 +3,7 @@ package jobs import ( "strconv" - "github.com/k6io/operator/api/v1alpha1" + "github.com/grafana/k6-operator/api/v1alpha1" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/resources/jobs/helpers_test.go b/pkg/resources/jobs/helpers_test.go index 8fe8b831..0cdf6c76 100644 --- a/pkg/resources/jobs/helpers_test.go +++ b/pkg/resources/jobs/helpers_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/go-test/deep" - "github.com/k6io/operator/api/v1alpha1" + "github.com/grafana/k6-operator/api/v1alpha1" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/resources/jobs/runner.go b/pkg/resources/jobs/runner.go index 68d76d2c..319d78eb 100644 --- a/pkg/resources/jobs/runner.go +++ b/pkg/resources/jobs/runner.go @@ -7,8 +7,8 @@ import ( "strings" - "github.com/k6io/operator/api/v1alpha1" - "github.com/k6io/operator/pkg/segmentation" + "github.com/grafana/k6-operator/api/v1alpha1" + "github.com/grafana/k6-operator/pkg/segmentation" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/resources/jobs/runner_test.go b/pkg/resources/jobs/runner_test.go index 522670d0..db7035a0 100644 --- a/pkg/resources/jobs/runner_test.go +++ b/pkg/resources/jobs/runner_test.go @@ -6,7 +6,7 @@ import ( "testing" deep "github.com/go-test/deep" - "github.com/k6io/operator/api/v1alpha1" + "github.com/grafana/k6-operator/api/v1alpha1" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/resources/jobs/starter.go b/pkg/resources/jobs/starter.go index 339ec6f2..ca4aab83 100644 --- a/pkg/resources/jobs/starter.go +++ b/pkg/resources/jobs/starter.go @@ -4,8 +4,8 @@ import ( "fmt" "strconv" - "github.com/k6io/operator/api/v1alpha1" - "github.com/k6io/operator/pkg/resources/containers" + "github.com/grafana/k6-operator/api/v1alpha1" + "github.com/grafana/k6-operator/pkg/resources/containers" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/resources/jobs/starter_test.go b/pkg/resources/jobs/starter_test.go index dad0db7d..75621f38 100644 --- a/pkg/resources/jobs/starter_test.go +++ b/pkg/resources/jobs/starter_test.go @@ -4,8 +4,8 @@ import ( "testing" deep "github.com/go-test/deep" - "github.com/k6io/operator/api/v1alpha1" - "github.com/k6io/operator/pkg/resources/containers" + "github.com/grafana/k6-operator/api/v1alpha1" + "github.com/grafana/k6-operator/pkg/resources/containers" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/segmentation/suite_test.go b/pkg/segmentation/suite_test.go index a8c07d00..7d6c1680 100644 --- a/pkg/segmentation/suite_test.go +++ b/pkg/segmentation/suite_test.go @@ -2,11 +2,12 @@ package segmentation_test import ( "fmt" - "github.com/k6io/operator/pkg/segmentation" + "testing" + + "github.com/grafana/k6-operator/pkg/segmentation" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "sigs.k8s.io/controller-runtime/pkg/envtest/printer" - "testing" ) func TestSegmentation(t *testing.T) {