From 8af6cca3d5aa4ddb2ae85a0c35330accdad84afa Mon Sep 17 00:00:00 2001 From: Rafal Korepta Date: Mon, 9 Dec 2024 19:38:23 +0100 Subject: [PATCH] Drop vectorized/configurator --- nightly-malformer/go.sum | 1 + operator/Makefile | 11 ----------- operator/README.md | 3 +-- operator/cmd/run/run.go | 2 +- operator/config/e2e-tests/kustomization.yaml | 3 --- operator/config/e2e-tests/manager.yaml | 2 +- .../internal/controller/vectorized/test/suite_test.go | 2 +- operator/kuttl-test-with-flags.yaml | 1 - operator/kuttl-test.yaml | 1 - operator/kuttl-unstable-test.yaml | 1 - operator/pkg/resources/resource_integration_test.go | 2 +- operator/pkg/resources/statefulset_test.go | 8 ++++---- .../update-conf-image/00-configurator.yaml | 2 +- .../e2e-unstable/update-conf-image/01-assert.yaml | 4 ++-- .../e2e-unstable/update-conf-image/03-assert.yaml | 6 +++--- 15 files changed, 16 insertions(+), 33 deletions(-) diff --git a/nightly-malformer/go.sum b/nightly-malformer/go.sum index 60bf178c8..3b55a2c5f 100644 --- a/nightly-malformer/go.sum +++ b/nightly-malformer/go.sum @@ -425,6 +425,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= diff --git a/operator/Makefile b/operator/Makefile index 5dfb2c08c..40e654715 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -1,6 +1,5 @@ # Image URL to use all building/pushing image targets OPERATOR_IMG_LATEST ?= "localhost/redpanda-operator:dev" -CONFIGURATOR_IMG_LATEST ?= "localhost/configurator:dev" HELM_CONTROLLER_VERSION ?= v0.37.2 SOURCE_CONTROLLER_VERSION ?= v1.2.3 @@ -48,11 +47,6 @@ test: manifests generate fmt manager: manifests generate fmt go build -o bin/manager cmd/main.go -# Build manager binary -.PHONY: configurator -configurator: manifests generate fmt - go build -o bin/configurator cmd/configurator/main.go - .PHONY: build build: manager configurator @@ -112,11 +106,6 @@ docker-build: echo "~~~ Building operator image :docker:" cd .. && task k8s:build-operator-images -# Build the docker image -docker-build-configurator: - echo "~~~ Building configurator image :docker:" - cd .. && task k8s:build-operator-images - # Preload controller image to kind cluster push-to-kind: kind-create certmanager-install kind load docker-image ${OPERATOR_IMG_LATEST} diff --git a/operator/README.md b/operator/README.md index 308971782..54d1c5795 100644 --- a/operator/README.md +++ b/operator/README.md @@ -78,11 +78,10 @@ Install cert manager make certmanager-install ``` -Build docker images for manager and configurator +Build docker images for manager ```bash make docker-build -make docker-build-configurator ``` Deploy operator to kind diff --git a/operator/cmd/run/run.go b/operator/cmd/run/run.go index 9579dfe4b..3a227528d 100644 --- a/operator/cmd/run/run.go +++ b/operator/cmd/run/run.go @@ -54,7 +54,7 @@ func (r RedpandaController) toString() string { } const ( - defaultConfiguratorContainerImage = "vectorized/configurator" + defaultConfiguratorContainerImage = "redpanda-data/redpanda-operator" AllControllers = RedpandaController("all") NodeController = RedpandaController("nodeWatcher") diff --git a/operator/config/e2e-tests/kustomization.yaml b/operator/config/e2e-tests/kustomization.yaml index d83c8cab1..f4bbaf605 100644 --- a/operator/config/e2e-tests/kustomization.yaml +++ b/operator/config/e2e-tests/kustomization.yaml @@ -5,9 +5,6 @@ images: - name: vectorized/redpanda-operator newName: localhost/redpanda-operator newTag: dev - - name: vectorized/configurator - newName: localhost/configurator - newTag: dev resources: - ../default patches: diff --git a/operator/config/e2e-tests/manager.yaml b/operator/config/e2e-tests/manager.yaml index efa78d582..d589b27a9 100644 --- a/operator/config/e2e-tests/manager.yaml +++ b/operator/config/e2e-tests/manager.yaml @@ -14,7 +14,7 @@ spec: - "--metrics-bind-address=127.0.0.1:8080" - "--leader-elect" - "--webhook-enabled=true" - - "--configurator-base-image=localhost/configurator" + - "--configurator-base-image=localhost/redpanda-operator" - "--configurator-tag=dev" - "--configurator-image-pull-policy=Never" - "--superusers-prefix=__redpanda_system__" diff --git a/operator/internal/controller/vectorized/test/suite_test.go b/operator/internal/controller/vectorized/test/suite_test.go index 6adeca509..98a5db658 100644 --- a/operator/internal/controller/vectorized/test/suite_test.go +++ b/operator/internal/controller/vectorized/test/suite_test.go @@ -170,7 +170,7 @@ var _ = BeforeSuite(func(suiteCtx SpecContext) { AdminAPIClientFactory: testAdminAPIFactory, DecommissionWaitInterval: 100 * time.Millisecond, }).WithClusterDomain("cluster.local").WithConfiguratorSettings(resources.ConfiguratorSettings{ - ConfiguratorBaseImage: "vectorized/configurator", + ConfiguratorBaseImage: "redpanda-data/redpanda-operator", ConfiguratorTag: "latest", ImagePullPolicy: "Always", }).SetupWithManager(k8sManager) diff --git a/operator/kuttl-test-with-flags.yaml b/operator/kuttl-test-with-flags.yaml index 3b8a213aa..a0f900b16 100644 --- a/operator/kuttl-test-with-flags.yaml +++ b/operator/kuttl-test-with-flags.yaml @@ -3,7 +3,6 @@ kind: TestSuite startKIND: true kindContainers: - localhost/redpanda-operator:dev - - localhost/configurator:dev - localhost/redpanda:dev testDirs: - ./tests/e2e-with-flags diff --git a/operator/kuttl-test.yaml b/operator/kuttl-test.yaml index 93d42aba6..20ed796b8 100644 --- a/operator/kuttl-test.yaml +++ b/operator/kuttl-test.yaml @@ -3,7 +3,6 @@ kind: TestSuite startKIND: true kindContainers: - localhost/redpanda-operator:dev - - localhost/configurator:dev - localhost/redpanda:dev testDirs: - ./tests/e2e diff --git a/operator/kuttl-unstable-test.yaml b/operator/kuttl-unstable-test.yaml index 74a538772..a65135ef3 100644 --- a/operator/kuttl-unstable-test.yaml +++ b/operator/kuttl-unstable-test.yaml @@ -5,7 +5,6 @@ skipDelete: true skipClusterDelete: true kindContainers: - localhost/redpanda-operator:dev - - localhost/configurator:dev - localhost/redpanda:dev testDirs: - ./tests/e2e-unstable diff --git a/operator/pkg/resources/resource_integration_test.go b/operator/pkg/resources/resource_integration_test.go index 4a174df50..aae89d0e9 100644 --- a/operator/pkg/resources/resource_integration_test.go +++ b/operator/pkg/resources/resource_integration_test.go @@ -93,7 +93,7 @@ func TestEnsure_StatefulSet(t *testing.T) { TestAdminTLSConfigProvider{}, "", res.ConfiguratorSettings{ - ConfiguratorBaseImage: "vectorized/configurator", + ConfiguratorBaseImage: "redpanda-data/redpanda-operator", ConfiguratorTag: "latest", ImagePullPolicy: "Always", }, diff --git a/operator/pkg/resources/statefulset_test.go b/operator/pkg/resources/statefulset_test.go index a8ea1399f..c72a4b57e 100644 --- a/operator/pkg/resources/statefulset_test.go +++ b/operator/pkg/resources/statefulset_test.go @@ -163,7 +163,7 @@ func TestEnsure(t *testing.T) { TestAdminTLSConfigProvider{}, "", resources.ConfiguratorSettings{ - ConfiguratorBaseImage: "vectorized/configurator", + ConfiguratorBaseImage: "redpanda-data/redpanda-operator", ConfiguratorTag: "latest", ImagePullPolicy: "Always", }, @@ -279,7 +279,7 @@ func defaultNodePoolstsFromCluster(pandaCluster *vectorizedv1alpha1.Cluster) *ap Spec: corev1.PodSpec{ InitContainers: []corev1.Container{{ Name: "redpanda-configurator", - Image: "vectorized/configurator:latest", + Image: "vectorized/redpanda-operator:latest", Resources: corev1.ResourceRequirements{ Limits: pandaCluster.Spec.Resources.Limits, Requests: pandaCluster.Spec.Resources.Requests, @@ -377,7 +377,7 @@ func stsFromCluster(pandaCluster *vectorizedv1alpha1.Cluster) *appsv1.StatefulSe Spec: corev1.PodSpec{ InitContainers: []corev1.Container{{ Name: "redpanda-configurator", - Image: "vectorized/configurator:latest", + Image: "vectorized/redpanda-operator:latest", Resources: corev1.ResourceRequirements{ Limits: pandaCluster.Spec.NodePools[0].Resources.Limits, Requests: pandaCluster.Spec.NodePools[0].Resources.Requests, @@ -641,7 +641,7 @@ func TestCurrentVersion(t *testing.T) { TestAdminTLSConfigProvider{}, "", resources.ConfiguratorSettings{ - ConfiguratorBaseImage: "vectorized/configurator", + ConfiguratorBaseImage: "redpanda-data/redpanda-operator", ConfiguratorTag: "latest", ImagePullPolicy: "Always", }, diff --git a/operator/tests/e2e-unstable/update-conf-image/00-configurator.yaml b/operator/tests/e2e-unstable/update-conf-image/00-configurator.yaml index 7d62d1058..9502112c0 100644 --- a/operator/tests/e2e-unstable/update-conf-image/00-configurator.yaml +++ b/operator/tests/e2e-unstable/update-conf-image/00-configurator.yaml @@ -14,7 +14,7 @@ spec: - "--metrics-bind-address=127.0.0.1:8080" - "--leader-elect" - "--webhook-enabled=true" - - "--configurator-base-image=vectorized/configurator" + - "--configurator-base-image=redpanda-data/redpanda-operator" - "--configurator-tag=v22.1.3" - "--configurator-image-pull-policy=IfNotPresent" imagePullPolicy: IfNotPresent diff --git a/operator/tests/e2e-unstable/update-conf-image/01-assert.yaml b/operator/tests/e2e-unstable/update-conf-image/01-assert.yaml index 0bb14411d..f06a00a0d 100644 --- a/operator/tests/e2e-unstable/update-conf-image/01-assert.yaml +++ b/operator/tests/e2e-unstable/update-conf-image/01-assert.yaml @@ -7,10 +7,10 @@ spec: spec: initContainers: - name: redpanda-configurator - image: "vectorized/configurator:v22.1.3" + image: "redpanda-data/redpanda-operator:v22.1.3" containers: - name: redpanda - image: "vectorized/redpanda:v22.1.3" + image: "redpanda-data/redpanda:v22.1.3" status: readyReplicas: 2 --- diff --git a/operator/tests/e2e-unstable/update-conf-image/03-assert.yaml b/operator/tests/e2e-unstable/update-conf-image/03-assert.yaml index f6f5ab796..3d7f4e984 100644 --- a/operator/tests/e2e-unstable/update-conf-image/03-assert.yaml +++ b/operator/tests/e2e-unstable/update-conf-image/03-assert.yaml @@ -7,7 +7,7 @@ spec: spec: initContainers: - name: redpanda-configurator - image: "localhost/configurator:dev" + image: "localhost/redpanda-operator:dev" containers: - name: redpanda image: "vectorized/redpanda:v22.1.3" @@ -21,7 +21,7 @@ metadata: spec: initContainers: - name: redpanda-configurator - image: "localhost/configurator:dev" + image: "localhost/redpanda-operator:dev" status: phase: "Running" --- @@ -32,7 +32,7 @@ metadata: spec: initContainers: - name: redpanda-configurator - image: "localhost/configurator:dev" + image: "localhost/redpanda-operator:dev" status: phase: "Running" ---