From 7bd9984843f215fcc3282159676458d5d1963570 Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Wed, 8 Jan 2025 16:31:14 +0100 Subject: [PATCH] do not refer to the statefulset-runner from the controllers folder --- controllers/Dockerfile | 1 - controllers/cleanup/build_cleaner.go | 3 +-- controllers/cleanup/build_cleaner_test.go | 3 +-- controllers/cleanup/package_cleaner.go | 3 +-- controllers/cleanup/package_cleaner_test.go | 3 +-- controllers/remote-debug/Dockerfile | 1 - 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/controllers/Dockerfile b/controllers/Dockerfile index 5beef8a17..d28872886 100644 --- a/controllers/Dockerfile +++ b/controllers/Dockerfile @@ -12,7 +12,6 @@ RUN --mount=type=cache,target=/go/pkg/mod \ COPY model model COPY controllers controllers -COPY statefulset-runner statefulset-runner COPY tools tools COPY version version diff --git a/controllers/cleanup/build_cleaner.go b/controllers/cleanup/build_cleaner.go index eb020beff..1313c731c 100644 --- a/controllers/cleanup/build_cleaner.go +++ b/controllers/cleanup/build_cleaner.go @@ -6,7 +6,6 @@ import ( "sort" korifiv1alpha1 "code.cloudfoundry.org/korifi/controllers/api/v1alpha1" - "code.cloudfoundry.org/korifi/statefulset-runner/controllers" "github.com/go-logr/logr" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" @@ -35,7 +34,7 @@ func (c BuildCleaner) Clean(ctx context.Context, app types.NamespacedName) error err = c.k8sClient.List(ctx, &cfBuilds, client.InNamespace(app.Namespace), client.MatchingLabels{ - controllers.LabelAppGUID: app.Name, + korifiv1alpha1.CFAppGUIDLabelKey: app.Name, }, ) if err != nil { diff --git a/controllers/cleanup/build_cleaner_test.go b/controllers/cleanup/build_cleaner_test.go index e7d3f5a09..30b710d40 100644 --- a/controllers/cleanup/build_cleaner_test.go +++ b/controllers/cleanup/build_cleaner_test.go @@ -5,7 +5,6 @@ import ( korifiv1alpha1 "code.cloudfoundry.org/korifi/controllers/api/v1alpha1" "code.cloudfoundry.org/korifi/controllers/cleanup" - "code.cloudfoundry.org/korifi/statefulset-runner/controllers" "github.com/google/uuid" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -108,7 +107,7 @@ func createBuild(namespace, appGUID, name string) *korifiv1alpha1.CFBuild { Name: name, Namespace: namespace, Labels: map[string]string{ - controllers.LabelAppGUID: appGUID, + korifiv1alpha1.CFAppGUIDLabelKey: appGUID, }, }, Spec: korifiv1alpha1.CFBuildSpec{Lifecycle: korifiv1alpha1.Lifecycle{Type: "buildpack"}}, diff --git a/controllers/cleanup/package_cleaner.go b/controllers/cleanup/package_cleaner.go index e0976ae73..6ede73c7f 100644 --- a/controllers/cleanup/package_cleaner.go +++ b/controllers/cleanup/package_cleaner.go @@ -5,7 +5,6 @@ import ( "sort" korifiv1alpha1 "code.cloudfoundry.org/korifi/controllers/api/v1alpha1" - "code.cloudfoundry.org/korifi/statefulset-runner/controllers" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" @@ -45,7 +44,7 @@ func (c PackageCleaner) Clean(ctx context.Context, app types.NamespacedName) err err = c.k8sClient.List(ctx, &cfPackages, client.InNamespace(app.Namespace), client.MatchingLabels{ - controllers.LabelAppGUID: app.Name, + korifiv1alpha1.CFAppGUIDLabelKey: app.Name, }, ) if err != nil { diff --git a/controllers/cleanup/package_cleaner_test.go b/controllers/cleanup/package_cleaner_test.go index 8a349f167..82fb86ac6 100644 --- a/controllers/cleanup/package_cleaner_test.go +++ b/controllers/cleanup/package_cleaner_test.go @@ -5,7 +5,6 @@ import ( korifiv1alpha1 "code.cloudfoundry.org/korifi/controllers/api/v1alpha1" "code.cloudfoundry.org/korifi/controllers/cleanup" - "code.cloudfoundry.org/korifi/statefulset-runner/controllers" "github.com/google/uuid" . "github.com/onsi/ginkgo/v2" @@ -119,7 +118,7 @@ func createPackage(namespace, appGUID, name string) *korifiv1alpha1.CFPackage { Name: name, Namespace: namespace, Labels: map[string]string{ - controllers.LabelAppGUID: appGUID, + korifiv1alpha1.CFAppGUIDLabelKey: appGUID, }, }, Spec: korifiv1alpha1.CFPackageSpec{Type: "bits"}, diff --git a/controllers/remote-debug/Dockerfile b/controllers/remote-debug/Dockerfile index 4204f44f8..791823ef5 100644 --- a/controllers/remote-debug/Dockerfile +++ b/controllers/remote-debug/Dockerfile @@ -12,7 +12,6 @@ RUN --mount=type=cache,target=/go/pkg/mod \ COPY model model COPY controllers controllers -COPY statefulset-runner statefulset-runner COPY tools tools COPY version version