From 3aaf331b79e4f7125c8db0b4d8e439aa20fffa98 Mon Sep 17 00:00:00 2001 From: Happy Bhati Date: Tue, 26 Mar 2024 13:06:03 -0400 Subject: [PATCH] feat(RHTAPREL-806): update operator toolkit reference This commit updates the `operator-toolkit` refrence as result of migration to `konflux-ci` from `redhat-appstudio` more details parent EPIC: https://issues.redhat.com/browse/RHTAPREL-800 Signed-off-by: Happy Bhati --- api/v1alpha1/internalrequest_conditions.go | 2 +- api/v1alpha1/internalrequest_types.go | 3 ++- api/v1alpha1/internalrequest_types_test.go | 2 +- controllers/controllers.go | 2 +- controllers/internalrequest/adapter.go | 5 +++-- controllers/internalrequest/adapter_test.go | 3 ++- controllers/internalrequest/controller.go | 5 +++-- .../internalrequest/internalrequest_suite_test.go | 9 +++++---- go.mod | 2 +- go.sum | 4 ++-- loader/loader.go | 3 ++- loader/loader_mock.go | 3 ++- loader/loader_mock_test.go | 2 +- loader/loader_suite_test.go | 9 +++++---- main.go | 9 ++++++--- tekton/tekton_suite_test.go | 3 ++- 16 files changed, 39 insertions(+), 27 deletions(-) diff --git a/api/v1alpha1/internalrequest_conditions.go b/api/v1alpha1/internalrequest_conditions.go index f76bf72..e4a7e3c 100644 --- a/api/v1alpha1/internalrequest_conditions.go +++ b/api/v1alpha1/internalrequest_conditions.go @@ -1,6 +1,6 @@ package v1alpha1 -import "github.com/redhat-appstudio/operator-toolkit/conditions" +import "github.com/konflux-ci/operator-toolkit/conditions" const ( // SucceededConditionType is the type used when setting a status condition diff --git a/api/v1alpha1/internalrequest_types.go b/api/v1alpha1/internalrequest_types.go index ffe5d83..68adf97 100644 --- a/api/v1alpha1/internalrequest_types.go +++ b/api/v1alpha1/internalrequest_types.go @@ -17,9 +17,10 @@ limitations under the License. package v1alpha1 import ( - "github.com/redhat-appstudio/operator-toolkit/conditions" "time" + "github.com/konflux-ci/operator-toolkit/conditions" + "github.com/redhat-appstudio/internal-services/metrics" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/api/v1alpha1/internalrequest_types_test.go b/api/v1alpha1/internalrequest_types_test.go index 912ba75..a343a10 100644 --- a/api/v1alpha1/internalrequest_types_test.go +++ b/api/v1alpha1/internalrequest_types_test.go @@ -8,7 +8,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/redhat-appstudio/operator-toolkit/conditions" + "github.com/konflux-ci/operator-toolkit/conditions" ) var _ = Describe("Internal Request type", func() { diff --git a/controllers/controllers.go b/controllers/controllers.go index f6b1165..27f3911 100644 --- a/controllers/controllers.go +++ b/controllers/controllers.go @@ -17,8 +17,8 @@ limitations under the License. package controllers import ( + "github.com/konflux-ci/operator-toolkit/controller" "github.com/redhat-appstudio/internal-services/controllers/internalrequest" - "github.com/redhat-appstudio/operator-toolkit/controller" ) var EnabledControllers = []controller.Controller{ diff --git a/controllers/internalrequest/adapter.go b/controllers/internalrequest/adapter.go index 9881fc9..242f60a 100644 --- a/controllers/internalrequest/adapter.go +++ b/controllers/internalrequest/adapter.go @@ -19,16 +19,17 @@ package internalrequest import ( "context" "fmt" + "os" + "github.com/go-logr/logr" + "github.com/konflux-ci/operator-toolkit/controller" "github.com/redhat-appstudio/internal-services/api/v1alpha1" "github.com/redhat-appstudio/internal-services/loader" "github.com/redhat-appstudio/internal-services/tekton" - "github.com/redhat-appstudio/operator-toolkit/controller" "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" - "os" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/controllers/internalrequest/adapter_test.go b/controllers/internalrequest/adapter_test.go index c297dd4..54b911c 100644 --- a/controllers/internalrequest/adapter_test.go +++ b/controllers/internalrequest/adapter_test.go @@ -18,8 +18,9 @@ package internalrequest import ( "fmt" + + toolkit "github.com/konflux-ci/operator-toolkit/loader" "github.com/redhat-appstudio/internal-services/loader" - toolkit "github.com/redhat-appstudio/operator-toolkit/loader" "reflect" diff --git a/controllers/internalrequest/controller.go b/controllers/internalrequest/controller.go index ad286f0..2fcb85a 100644 --- a/controllers/internalrequest/controller.go +++ b/controllers/internalrequest/controller.go @@ -18,13 +18,14 @@ package internalrequest import ( "context" + "github.com/go-logr/logr" + "github.com/konflux-ci/operator-toolkit/controller" + "github.com/konflux-ci/operator-toolkit/predicates" libhandler "github.com/operator-framework/operator-lib/handler" "github.com/redhat-appstudio/internal-services/api/v1alpha1" "github.com/redhat-appstudio/internal-services/loader" "github.com/redhat-appstudio/internal-services/tekton" - "github.com/redhat-appstudio/operator-toolkit/controller" - "github.com/redhat-appstudio/operator-toolkit/predicates" tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/controllers/internalrequest/internalrequest_suite_test.go b/controllers/internalrequest/internalrequest_suite_test.go index 1befa28..a6cb6d2 100644 --- a/controllers/internalrequest/internalrequest_suite_test.go +++ b/controllers/internalrequest/internalrequest_suite_test.go @@ -18,14 +18,15 @@ package internalrequest import ( "context" - appstudiov1alpha1 "github.com/redhat-appstudio/internal-services/api/v1alpha1" - "github.com/redhat-appstudio/operator-toolkit/test" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "go/build" "path/filepath" - ctrl "sigs.k8s.io/controller-runtime" "testing" + "github.com/konflux-ci/operator-toolkit/test" + appstudiov1alpha1 "github.com/redhat-appstudio/internal-services/api/v1alpha1" + tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + ctrl "sigs.k8s.io/controller-runtime" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/go.mod b/go.mod index b475a38..23477ca 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,11 @@ go 1.18 require ( github.com/go-logr/logr v1.2.3 + github.com/konflux-ci/operator-toolkit v0.0.0-20240402130556-ef6dcbeca69d github.com/onsi/ginkgo/v2 v2.6.0 github.com/onsi/gomega v1.24.1 github.com/operator-framework/operator-lib v0.11.0 github.com/prometheus/client_golang v1.14.0 - github.com/redhat-appstudio/operator-toolkit v0.0.0-20230705141436-de654b7a7aed github.com/tektoncd/pipeline v0.42.0 go.uber.org/zap v1.24.0 k8s.io/api v0.26.1 diff --git a/go.sum b/go.sum index 2894990..3f1008c 100644 --- a/go.sum +++ b/go.sum @@ -223,6 +223,8 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konflux-ci/operator-toolkit v0.0.0-20240402130556-ef6dcbeca69d h1:z7j3mglNoXvIrw5Vz/Ul+izoITRaqYURPIWrFoEyHgI= +github.com/konflux-ci/operator-toolkit v0.0.0-20240402130556-ef6dcbeca69d/go.mod h1:AcChx7FjpYSIkDvQgaUKyauuF0PXm3ivB5MqZSC9Eis= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -298,8 +300,6 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/prometheus/statsd_exporter v0.22.8 h1:Qo2D9ZzaQG+id9i5NYNGmbf1aa/KxKbB9aKfMS+Yib0= github.com/prometheus/statsd_exporter v0.22.8/go.mod h1:/DzwbTEaFTE0Ojz5PqcSk6+PFHOPWGxdXVr6yC8eFOM= -github.com/redhat-appstudio/operator-toolkit v0.0.0-20230705141436-de654b7a7aed h1:4RQmIIyZPm7dZuwtPUvbTLQCNIkUR13zLIVlUE9nunA= -github.com/redhat-appstudio/operator-toolkit v0.0.0-20230705141436-de654b7a7aed/go.mod h1:6lVK58G/zkoxMoHAmYxzF6La8rMmCeZwOQk6i0dpYZo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= diff --git a/loader/loader.go b/loader/loader.go index 26ced93..3ec88ee 100644 --- a/loader/loader.go +++ b/loader/loader.go @@ -2,9 +2,10 @@ package loader import ( "context" + + toolkit "github.com/konflux-ci/operator-toolkit/loader" "github.com/redhat-appstudio/internal-services/api/v1alpha1" "github.com/redhat-appstudio/internal-services/tekton" - toolkit "github.com/redhat-appstudio/operator-toolkit/loader" "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/loader/loader_mock.go b/loader/loader_mock.go index 47f1c1c..7e708ae 100644 --- a/loader/loader_mock.go +++ b/loader/loader_mock.go @@ -2,8 +2,9 @@ package loader import ( "context" + + toolkit "github.com/konflux-ci/operator-toolkit/loader" "github.com/redhat-appstudio/internal-services/api/v1alpha1" - toolkit "github.com/redhat-appstudio/operator-toolkit/loader" "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/loader/loader_mock_test.go b/loader/loader_mock_test.go index 57c568e..5f7ffe8 100644 --- a/loader/loader_mock_test.go +++ b/loader/loader_mock_test.go @@ -1,10 +1,10 @@ package loader import ( + toolkit "github.com/konflux-ci/operator-toolkit/loader" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/redhat-appstudio/internal-services/api/v1alpha1" - toolkit "github.com/redhat-appstudio/operator-toolkit/loader" tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" ) diff --git a/loader/loader_suite_test.go b/loader/loader_suite_test.go index 5f8276f..b05b213 100644 --- a/loader/loader_suite_test.go +++ b/loader/loader_suite_test.go @@ -18,14 +18,15 @@ package loader import ( "context" - appstudiov1alpha1 "github.com/redhat-appstudio/internal-services/api/v1alpha1" - "github.com/redhat-appstudio/operator-toolkit/test" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "go/build" "path/filepath" - ctrl "sigs.k8s.io/controller-runtime" "testing" + "github.com/konflux-ci/operator-toolkit/test" + appstudiov1alpha1 "github.com/redhat-appstudio/internal-services/api/v1alpha1" + tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + ctrl "sigs.k8s.io/controller-runtime" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/main.go b/main.go index 11e9643..885faa7 100644 --- a/main.go +++ b/main.go @@ -18,16 +18,19 @@ package main import ( "flag" + "os" + "github.com/redhat-appstudio/internal-services/metadata" "github.com/redhat-appstudio/internal-services/tekton" - "github.com/redhat-appstudio/operator-toolkit/controller" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + + "github.com/konflux-ci/operator-toolkit/controller" "go.uber.org/zap/zapcore" + + tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" "k8s.io/apimachinery/pkg/labels" clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" - "os" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/cluster" "sigs.k8s.io/controller-runtime/pkg/manager" diff --git a/tekton/tekton_suite_test.go b/tekton/tekton_suite_test.go index d6852df..e4b92ac 100644 --- a/tekton/tekton_suite_test.go +++ b/tekton/tekton_suite_test.go @@ -18,11 +18,12 @@ package tekton import ( "context" - "github.com/redhat-appstudio/operator-toolkit/test" "go/build" "path/filepath" "testing" + "github.com/konflux-ci/operator-toolkit/test" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega"