From ae0550d1beb7978d8f361d4b6c48d9bf959ae534 Mon Sep 17 00:00:00 2001 From: Max Shaposhnyk Date: Thu, 16 May 2024 11:03:01 +0300 Subject: [PATCH] Remove remotesecret dependency Signed-off-by: Max Shaposhnyk --- controllers/component_image_controller_test.go | 3 --- controllers/suite_test.go | 4 ---- go.mod | 1 - main.go | 3 --- 4 files changed, 11 deletions(-) diff --git a/controllers/component_image_controller_test.go b/controllers/component_image_controller_test.go index 20115e0..4b811b7 100644 --- a/controllers/component_image_controller_test.go +++ b/controllers/component_image_controller_test.go @@ -26,9 +26,7 @@ import ( . "github.com/onsi/gomega" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - remotesecretv1beta1 "github.com/redhat-appstudio/remote-secret/api/v1beta1" corev1 "k8s.io/api/core/v1" - k8sErrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "github.com/redhat-appstudio/image-controller/pkg/quay" @@ -592,7 +590,6 @@ var _ = Describe("Component image controller", func() { deleteSecret(types.NamespacedName{Name: expectedPullSecretName, Namespace: resourceKey.Namespace}) pullSecretKey := types.NamespacedName{Name: expectedPullSecretName, Namespace: defaultNamespace} - Expect(k8sErrors.IsNotFound(k8sClient.Get(ctx, pullSecretKey, &remotesecretv1beta1.RemoteSecret{}))) isCreateRepositoryInvoked := false quay.CreateRepositoryFunc = func(repository quay.RepositoryRequest) (*quay.Repository, error) { diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 57defeb..051db12 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -39,7 +39,6 @@ import ( appstudioredhatcomv1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1" imagerepositoryv1alpha1 "github.com/redhat-appstudio/image-controller/api/v1alpha1" "github.com/redhat-appstudio/image-controller/pkg/quay" - remotesecretv1beta1 "github.com/redhat-appstudio/remote-secret/api/v1beta1" //+kubebuilder:scaffold:imports ) @@ -92,9 +91,6 @@ var _ = BeforeSuite(func() { err = appstudioredhatcomv1alpha1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) - err = remotesecretv1beta1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - err = imagerepositoryv1alpha1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) diff --git a/go.mod b/go.mod index 750f026..0c18e9c 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,6 @@ require ( github.com/onsi/gomega v1.30.0 github.com/prometheus/client_golang v1.18.0 github.com/redhat-appstudio/application-api v0.0.0-20231026192857-89515ad2504f - github.com/redhat-appstudio/remote-secret v0.0.0-20240103070316-c146261dd544 go.uber.org/zap v1.26.0 gotest.tools/v3 v3.5.0 k8s.io/api v0.29.0 diff --git a/main.go b/main.go index 3caf778..3a5d0a5 100644 --- a/main.go +++ b/main.go @@ -44,8 +44,6 @@ import ( "github.com/go-logr/logr" appstudioredhatcomv1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1" - remotesecretv1beta1 "github.com/redhat-appstudio/remote-secret/api/v1beta1" - imagerepositoryv1alpha1 "github.com/redhat-appstudio/image-controller/api/v1alpha1" "github.com/redhat-appstudio/image-controller/controllers" "github.com/redhat-appstudio/image-controller/pkg/quay" @@ -66,7 +64,6 @@ func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(appstudioredhatcomv1alpha1.AddToScheme(scheme)) - utilruntime.Must(remotesecretv1beta1.AddToScheme(scheme)) utilruntime.Must(imagerepositoryv1alpha1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme }