diff --git a/Makefile b/Makefile index 4df0fe61..1b28eb37 100644 --- a/Makefile +++ b/Makefile @@ -50,11 +50,11 @@ $(KUBEBUILDER_ASSETS): ### Targets .PHONY: unit-tests -unit-tests: install-tools $(KUBEBUILDER_ASSETS) generate fmt vet vuln manifests ## Run unit tests +unit-tests: install-tools $(KUBEBUILDER_ASSETS) generate fmt vet manifests ## Run unit tests ginkgo -r --randomize-all api/ internal/ rabbitmqclient/ .PHONY: integration-tests -integration-tests: install-tools $(KUBEBUILDER_ASSETS) generate fmt vet vuln manifests ## Run integration tests +integration-tests: install-tools $(KUBEBUILDER_ASSETS) generate fmt vet manifests ## Run integration tests ginkgo -r --randomize-all controllers/ just-integration-tests: $(KUBEBUILDER_ASSETS) vet diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index d368cfb4..6d32ae00 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* RabbitMQ Messaging Topology Kubernetes Operator diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 4c185352..23bb4d30 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* RabbitMQ Messaging Topology Kubernetes Operator diff --git a/controllers/binding_controller.go b/controllers/binding_controller.go index c0afc67b..b7d137d6 100644 --- a/controllers/binding_controller.go +++ b/controllers/binding_controller.go @@ -30,7 +30,7 @@ import ( type BindingReconciler struct{} -func (r *BindingReconciler) DeclareFunc(ctx context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { +func (r *BindingReconciler) DeclareFunc(_ context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { binding := obj.(*topology.Binding) info, err := internal.GenerateBindingInfo(binding) if err != nil { diff --git a/controllers/exchange_controller.go b/controllers/exchange_controller.go index 257730c9..a9e65d04 100644 --- a/controllers/exchange_controller.go +++ b/controllers/exchange_controller.go @@ -26,7 +26,7 @@ import ( type ExchangeReconciler struct{} -func (r *ExchangeReconciler) DeclareFunc(ctx context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { +func (r *ExchangeReconciler) DeclareFunc(_ context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { exchange := obj.(*topology.Exchange) settings, err := internal.GenerateExchangeSettings(exchange) if err != nil { diff --git a/controllers/policy_controller.go b/controllers/policy_controller.go index 63cf600c..2e0e7069 100644 --- a/controllers/policy_controller.go +++ b/controllers/policy_controller.go @@ -27,7 +27,7 @@ import ( type PolicyReconciler struct{} // DeclareFunc creates or updates a given policy using rabbithole client.PutPolicy -func (r *PolicyReconciler) DeclareFunc(ctx context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { +func (r *PolicyReconciler) DeclareFunc(_ context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { policy := obj.(*topology.Policy) generatePolicy, err := internal.GeneratePolicy(policy) if err != nil { diff --git a/controllers/queue_controller.go b/controllers/queue_controller.go index 912e54b5..c4884292 100644 --- a/controllers/queue_controller.go +++ b/controllers/queue_controller.go @@ -30,7 +30,7 @@ import ( type QueueReconciler struct{} -func (r *QueueReconciler) DeclareFunc(ctx context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { +func (r *QueueReconciler) DeclareFunc(_ context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { queue := obj.(*topology.Queue) queueSettings, err := internal.GenerateQueueSettings(queue) if err != nil { diff --git a/controllers/schemareplication_controller.go b/controllers/schemareplication_controller.go index 9d6e68b0..ee96b1b5 100644 --- a/controllers/schemareplication_controller.go +++ b/controllers/schemareplication_controller.go @@ -34,7 +34,7 @@ func (r *SchemaReplicationReconciler) DeclareFunc(ctx context.Context, client ra return validateResponse(client.PutGlobalParameter(SchemaReplicationParameterName, endpoints)) } -func (r *SchemaReplicationReconciler) DeleteFunc(ctx context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { +func (r *SchemaReplicationReconciler) DeleteFunc(ctx context.Context, client rabbitmqclient.Client, _ topology.TopologyResource) error { logger := ctrl.LoggerFrom(ctx) err := validateResponseForDeletion(client.DeleteGlobalParameter(SchemaReplicationParameterName)) if errors.Is(err, NotFound) { diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 2f6b38c4..b72e475a 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -12,8 +12,11 @@ package controllers_test import ( "context" "crypto/x509" + "fmt" "go/build" "path/filepath" + "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/metrics/server" "testing" "time" @@ -31,7 +34,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" @@ -87,8 +90,9 @@ var _ = BeforeSuite(func() { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{ filepath.Join("..", "config", "crd", "bases"), - filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "rabbitmq", "cluster-operator@v1.14.0", "config", "crd", "bases"), + filepath.Join(build.Default.GOPATH, "pkg", "mod", "github.com", "rabbitmq", "cluster-operator", "v2@v2.6.0", "config", "crd", "bases"), }, + ErrorIfCRDPathMissing: true, } cfg, err := testEnv.Start() @@ -104,8 +108,13 @@ var _ = BeforeSuite(func() { Expect(err).NotTo(HaveOccurred()) mgr, err = ctrl.NewManager(cfg, ctrl.Options{ - Scheme: scheme.Scheme, - MetricsBindAddress: "0", // To avoid MacOS firewall pop-up every time you run this suite + Scheme: scheme.Scheme, + Metrics: server.Options{ + BindAddress: "0", // To avoid MacOS firewall pop-up every time you run this suite + }, + Cache: cache.Options{ + DefaultNamespaces: map[string]cache.Config{"default": {}}, + }, }) Expect(err).ToNot(HaveOccurred()) @@ -228,34 +237,6 @@ var _ = BeforeSuite(func() { komega.SetClient(client) komega.SetContext(ctx) - rmqCreds := corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "example-rabbit-user-credentials", - Namespace: "default", - }, - } - Expect(client.Create(ctx, &rmqCreds)).To(Succeed()) - - rmqSrv := corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "example-rabbit", - Namespace: "default", - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Port: 15672, - Name: "management", - }, - { - Port: 15671, - Name: "management-tls", - }, - }, - }, - } - Expect(client.Create(ctx, &rmqSrv)).To(Succeed()) - rmq := rabbitmqv1beta1.RabbitmqCluster{ ObjectMeta: metav1.ObjectMeta{ Name: "example-rabbit", @@ -270,49 +251,7 @@ var _ = BeforeSuite(func() { }, }, } - Expect(client.Create(ctx, &rmq)).To(Succeed()) - - rmq.Status = rabbitmqv1beta1.RabbitmqClusterStatus{ - Binding: &corev1.LocalObjectReference{ - Name: "example-rabbit-user-credentials", - }, - DefaultUser: &rabbitmqv1beta1.RabbitmqClusterDefaultUser{ - ServiceReference: &rabbitmqv1beta1.RabbitmqClusterServiceReference{ - Name: "example-rabbit", - Namespace: "default", - }, - }, - } - rmq.Status.SetConditions([]runtime.Object{}) - Expect(client.Status().Update(ctx, &rmq)).To(Succeed()) - - rmqCreds = corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "allow-all-rabbit-user-credentials", - Namespace: "default", - }, - } - Expect(client.Create(ctx, &rmqCreds)).To(Succeed()) - - rmqSrv = corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "allow-all-rabbit", - Namespace: "default", - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Port: 15672, - Name: "management", - }, - { - Port: 15671, - Name: "management-tls", - }, - }, - }, - } - Expect(client.Create(ctx, &rmqSrv)).To(Succeed()) + Expect(createRabbitmqClusterResources(client, &rmq)).To(Succeed()) rmq = rabbitmqv1beta1.RabbitmqCluster{ ObjectMeta: metav1.ObjectMeta{ @@ -323,21 +262,7 @@ var _ = BeforeSuite(func() { }, }, } - Expect(client.Create(ctx, &rmq)).To(Succeed()) - - rmq.Status = rabbitmqv1beta1.RabbitmqClusterStatus{ - Binding: &corev1.LocalObjectReference{ - Name: "allow-all-rabbit-user-credentials", - }, - DefaultUser: &rabbitmqv1beta1.RabbitmqClusterDefaultUser{ - ServiceReference: &rabbitmqv1beta1.RabbitmqClusterServiceReference{ - Name: "allow-all-rabbit", - Namespace: "default", - }, - }, - } - rmq.Status.SetConditions([]runtime.Object{}) - Expect(client.Status().Update(ctx, &rmq)).To(Succeed()) + Expect(createRabbitmqClusterResources(client, &rmq)).To(Succeed()) endpointsSecretBody := map[string][]byte{ "username": []byte("a-random-user"), @@ -420,3 +345,62 @@ func FakeRabbitMQClientFactoryArgsForCall(i int) (map[string]string, bool, *x509 argsForCall := fakeRabbitMQClientFactoryArgsForCall[i] return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 } + +func createRabbitmqClusterResources(client runtimeClient.Client, rabbitmqObj *rabbitmqv1beta1.RabbitmqCluster) error { + rmqCreds := corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%s-user-credentials", rabbitmqObj.Name), + Namespace: rabbitmqObj.Namespace, + }, + } + err := client.Create(ctx, &rmqCreds) + if err != nil { + return err + } + + rmqSrv := corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: rabbitmqObj.Name, + Namespace: rabbitmqObj.Namespace, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Port: 15672, + Name: "management", + }, + { + Port: 15671, + Name: "management-tls", + }, + }, + }, + } + err = client.Create(ctx, &rmqSrv) + if err != nil { + return err + } + + err = client.Create(ctx, rabbitmqObj) + if err != nil { + return err + } + + rabbitmqObj.Status = rabbitmqv1beta1.RabbitmqClusterStatus{ + Binding: &corev1.LocalObjectReference{ + Name: fmt.Sprintf("%s-user-credentials", rabbitmqObj.Name), + }, + DefaultUser: &rabbitmqv1beta1.RabbitmqClusterDefaultUser{ + ServiceReference: &rabbitmqv1beta1.RabbitmqClusterServiceReference{ + Name: rabbitmqObj.Name, + Namespace: rabbitmqObj.Namespace, + }, + }, + } + rabbitmqObj.Status.SetConditions([]runtime.Object{}) + err = client.Status().Update(ctx, rabbitmqObj) + if err != nil { + return err + } + return nil +} diff --git a/controllers/super_stream_controller.go b/controllers/super_stream_controller.go index 29a892a9..7bedae4b 100644 --- a/controllers/super_stream_controller.go +++ b/controllers/super_stream_controller.go @@ -15,7 +15,7 @@ import ( "strconv" "github.com/go-logr/logr" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" topologyv1alpha1 "github.com/rabbitmq/messaging-topology-operator/api/v1alpha1" topology "github.com/rabbitmq/messaging-topology-operator/api/v1beta1" "github.com/rabbitmq/messaging-topology-operator/internal/managedresource" diff --git a/controllers/topology_controller_test.go b/controllers/topology_controller_test.go index 52bf0e2a..f8164d0d 100644 --- a/controllers/topology_controller_test.go +++ b/controllers/topology_controller_test.go @@ -1,8 +1,17 @@ package controllers_test import ( + "context" + "fmt" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" "github.com/rabbitmq/messaging-topology-operator/controllers" + v1 "k8s.io/api/core/v1" + k8sApiErrors "k8s.io/apimachinery/pkg/api/errors" "net/http" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -11,10 +20,14 @@ import ( ) var _ = Describe("TopologyReconciler", func() { + const ( + namespace = "topology-reconciler-test" + name = "topology-rabbit" + ) var ( commonRabbitmqClusterRef = topology.RabbitmqClusterReference{ - Name: "example-rabbit", - Namespace: "default", + Name: name, + Namespace: namespace, } commonHttpCreatedResponse = &http.Response{ Status: "201 Created", @@ -24,22 +37,77 @@ var _ = Describe("TopologyReconciler", func() { Status: "204 No Content", StatusCode: http.StatusNoContent, } + topologyMgr ctrl.Manager + managerCtx context.Context + managerCancel context.CancelFunc ) + BeforeEach(func() { + var err error + topologyMgr, err = ctrl.NewManager(testEnv.Config, ctrl.Options{ + Metrics: server.Options{ + BindAddress: "0", // To avoid MacOS firewall pop-up every time you run this suite + }, + Cache: cache.Options{ + DefaultNamespaces: map[string]cache.Config{namespace: {}}, + }, + Logger: GinkgoLogr, + }) + Expect(err).ToNot(HaveOccurred()) + + managerCtx, managerCancel = context.WithCancel(context.Background()) + go func(ctx context.Context) { + defer GinkgoRecover() + Expect(topologyMgr.Start(ctx)).To(Succeed()) + }(managerCtx) + + c := topologyMgr.GetClient() + err = c.Create(context.Background(), &v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}}) + err = client.Create(context.Background(), &v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}}) + if err != nil && !k8sApiErrors.IsAlreadyExists(err) { + Fail(err.Error()) + } + + rmq := &rabbitmqv1beta1.RabbitmqCluster{ + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, + Spec: rabbitmqv1beta1.RabbitmqClusterSpec{ + TLS: rabbitmqv1beta1.TLSSpec{ + SecretName: "i-do-not-exist-but-its-fine", + }, + }, + } + err = createRabbitmqClusterResources(c, rmq) + if err != nil && !k8sApiErrors.IsAlreadyExists(err) { + Fail(err.Error()) + } + }) + + AfterEach(func() { + managerCancel() + // Sad workaround to avoid controllers racing for the reconciliation of other's + // test cases. Without this wait, the last run test consistently fails because + // the previous cancelled manager is just in time to reconcile the Queue of the + // new/last test, and use the wrong/unexpected arguments in the queue declare call + // + // Eventual consistency is nice when you have good means of awaiting. That's not the + // case with testenv and kubernetes controllers. + <-time.After(time.Second) + }) + When("k8s domain is configured", func() { It("sets the domain name in the URI to connect to RabbitMQ", func() { Expect((&controllers.TopologyReconciler{ - Client: mgr.GetClient(), + Client: topologyMgr.GetClient(), Type: &topology.Queue{}, - Scheme: mgr.GetScheme(), + Scheme: topologyMgr.GetScheme(), Recorder: fakeRecorder, RabbitmqClientFactory: fakeRabbitMQClientFactory, ReconcileFunc: &controllers.QueueReconciler{}, KubernetesClusterDomain: ".some-domain.com", - }).SetupWithManager(mgr)).To(Succeed()) + }).SetupWithManager(topologyMgr)).To(Succeed()) queue := &topology.Queue{ - ObjectMeta: metav1.ObjectMeta{Name: "ab-queue", Namespace: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "ab-queue", Namespace: namespace}, Spec: topology.QueueSpec{RabbitmqClusterReference: commonRabbitmqClusterRef}, } fakeRabbitMQClient.DeclareQueueReturns(commonHttpCreatedResponse, nil) @@ -51,25 +119,24 @@ var _ = Describe("TopologyReconciler", func() { }, 5).Should(BeNumerically(">", 0)) credentials, _, _ := FakeRabbitMQClientFactoryArgsForCall(0) - uri, found := credentials["uri"] - Expect(found).To(BeTrue(), "expected to find key 'uri'") - Expect(uri).To(BeEquivalentTo("https://example-rabbit.default.svc.some-domain.com:15671")) + expected := fmt.Sprintf("https://%s.%s.svc.some-domain.com:15671", name, namespace) + Expect(credentials).Should(HaveKeyWithValue("uri", expected)) }) }) When("domain name is not set", func() { It("uses internal short name", func() { Expect((&controllers.TopologyReconciler{ - Client: mgr.GetClient(), + Client: topologyMgr.GetClient(), Type: &topology.Queue{}, - Scheme: mgr.GetScheme(), + Scheme: topologyMgr.GetScheme(), Recorder: fakeRecorder, RabbitmqClientFactory: fakeRabbitMQClientFactory, ReconcileFunc: &controllers.QueueReconciler{}, - }).SetupWithManager(mgr)).To(Succeed()) + }).SetupWithManager(topologyMgr)).To(Succeed()) queue := &topology.Queue{ - ObjectMeta: metav1.ObjectMeta{Name: "bb-queue", Namespace: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "bb-queue", Namespace: namespace}, Spec: topology.QueueSpec{RabbitmqClusterReference: commonRabbitmqClusterRef}, } fakeRabbitMQClient.DeclareQueueReturns(commonHttpCreatedResponse, nil) @@ -81,26 +148,25 @@ var _ = Describe("TopologyReconciler", func() { }, 5).Should(BeNumerically(">", 0)) credentials, _, _ := FakeRabbitMQClientFactoryArgsForCall(0) - uri, found := credentials["uri"] - Expect(found).To(BeTrue(), "expected to find key 'uri'") - Expect(uri).To(BeEquivalentTo("https://example-rabbit.default.svc:15671")) + expected := fmt.Sprintf("https://%s.%s.svc:15671", name, namespace) + Expect(credentials).Should(HaveKeyWithValue("uri", expected)) }) }) When("flag for plain HTTP connection is set", func() { It("uses http for connection", func() { Expect((&controllers.TopologyReconciler{ - Client: mgr.GetClient(), + Client: topologyMgr.GetClient(), Type: &topology.Queue{}, - Scheme: mgr.GetScheme(), + Scheme: topologyMgr.GetScheme(), Recorder: fakeRecorder, RabbitmqClientFactory: fakeRabbitMQClientFactory, ReconcileFunc: &controllers.QueueReconciler{}, ConnectUsingPlainHTTP: true, - }).SetupWithManager(mgr)).To(Succeed()) + }).SetupWithManager(topologyMgr)).To(Succeed()) queue := &topology.Queue{ - ObjectMeta: metav1.ObjectMeta{Name: "cb-queue", Namespace: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "cb-queue", Namespace: namespace}, Spec: topology.QueueSpec{RabbitmqClusterReference: commonRabbitmqClusterRef}, } fakeRabbitMQClient.DeclareQueueReturns(commonHttpCreatedResponse, nil) @@ -112,9 +178,8 @@ var _ = Describe("TopologyReconciler", func() { }, 5).Should(BeNumerically(">", 0)) credentials, _, _ := FakeRabbitMQClientFactoryArgsForCall(0) - uri, found := credentials["uri"] - Expect(found).To(BeTrue(), "expected to find key 'uri'") - Expect(uri).To(BeEquivalentTo("http://example-rabbit.default.svc:15672")) + expected := fmt.Sprintf("http://%s.%s.svc:15672", name, namespace) + Expect(credentials).Should(HaveKeyWithValue("uri", expected)) }) }) }) diff --git a/controllers/vhost_controller.go b/controllers/vhost_controller.go index 43a6d640..d7aa0875 100644 --- a/controllers/vhost_controller.go +++ b/controllers/vhost_controller.go @@ -20,7 +20,7 @@ type VhostReconciler struct { client.Client } -func (r *VhostReconciler) DeclareFunc(ctx context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { +func (r *VhostReconciler) DeclareFunc(_ context.Context, client rabbitmqclient.Client, obj topology.TopologyResource) error { vhost := obj.(*topology.Vhost) return validateResponse(client.PutVhost(vhost.Spec.Name, *internal.GenerateVhostSettings(vhost))) } diff --git a/docs/api/rabbitmq.com.ref.asciidoc b/docs/api/rabbitmq.com.ref.asciidoc index 1118a48e..27ae4f5b 100644 --- a/docs/api/rabbitmq.com.ref.asciidoc +++ b/docs/api/rabbitmq.com.ref.asciidoc @@ -200,7 +200,7 @@ BindingSpec defines the desired state of Binding | *`destination`* __string__ | Cannot be updated | *`destinationType`* __string__ | Cannot be updated | *`routingKey`* __string__ | Cannot be updated -| *`arguments`* __RawExtension__ | Cannot be updated +| *`arguments`* __xref:{anchor_prefix}-k8s-io-apimachinery-pkg-runtime-rawextension[$$RawExtension$$]__ | Cannot be updated | *`rabbitmqClusterReference`* __xref:{anchor_prefix}-github-com-rabbitmq-messaging-topology-operator-api-v1beta1-rabbitmqclusterreference[$$RabbitmqClusterReference$$]__ | Reference to the RabbitmqCluster that the binding will be created in. Required property. |=== diff --git a/go.mod b/go.mod index a6d0ba6a..28e0a121 100644 --- a/go.mod +++ b/go.mod @@ -4,26 +4,26 @@ go 1.20 require ( github.com/cloudflare/cfssl v1.6.4 - github.com/elastic/crd-ref-docs v0.0.9 + github.com/elastic/crd-ref-docs v0.0.10 github.com/go-logr/logr v1.3.0 - github.com/google/uuid v1.4.0 + github.com/google/uuid v1.3.1 github.com/hashicorp/vault/api v1.9.2 github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/michaelklishin/rabbit-hole/v2 v2.15.0 github.com/onsi/ginkgo/v2 v2.13.1 github.com/onsi/gomega v1.30.0 - github.com/rabbitmq/cluster-operator v1.14.0 + github.com/rabbitmq/cluster-operator/v2 v2.6.0 github.com/sclevine/yj v0.0.0-20200815061347-554173e71934 gopkg.in/ini.v1 v1.67.0 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.1 - k8s.io/code-generator v0.28.3 - k8s.io/klog/v2 v2.100.1 - k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d - k8s.io/utils v0.0.0-20230505201702-9f6742963106 - sigs.k8s.io/controller-runtime v0.15.0 - sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220217024943-cfd92767d28e + k8s.io/api v0.28.4 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 + k8s.io/code-generator v0.28.4 + k8s.io/klog/v2 v2.110.1 + k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e + k8s.io/utils v0.0.0-20230726121419-3b25d923346b + sigs.k8s.io/controller-runtime v0.16.3 + sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20231121004636-2154ffbc22e2 sigs.k8s.io/controller-tools v0.13.0 sigs.k8s.io/kustomize/kustomize/v5 v5.2.1 ) @@ -36,20 +36,20 @@ require ( github.com/cenkalti/backoff/v3 v3.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-errors/errors v1.5.0 // indirect - github.com/go-jose/go-jose/v3 v3.0.1 // indirect + github.com/go-jose/go-jose/v3 v3.0.0 // indirect github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.4 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gobuffalo/flect v1.0.2 // indirect - github.com/goccy/go-yaml v1.11.0 // indirect + github.com/goccy/go-yaml v1.11.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -57,7 +57,7 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect + github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -77,7 +77,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -95,35 +95,35 @@ require ( github.com/prometheus/procfs v0.10.1 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/spf13/afero v1.6.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b // indirect github.com/xlab/treeprint v1.2.0 // indirect github.com/zmap/zcrypto v0.0.0-20210511125630-18f1e0152cfc // indirect github.com/zmap/zlint/v3 v3.1.0 // indirect go.starlark.net v0.0.0-20230912135651-745481cf39ed // indirect - go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect + go.uber.org/zap v1.26.0 // indirect + golang.org/x/crypto v0.15.0 // indirect + golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/term v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.14.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/evanphx/json-patch.v5 v5.6.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.28.0 // indirect - k8s.io/component-base v0.28.0 // indirect + k8s.io/apiextensions-apiserver v0.28.3 // indirect + k8s.io/component-base v0.28.3 // indirect k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.15.0 // indirect diff --git a/go.sum b/go.sum index 61759e95..9fc202be 100644 --- a/go.sum +++ b/go.sum @@ -7,7 +7,6 @@ github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF0 github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -23,15 +22,15 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cfssl v1.6.4 h1:NMOvfrEjFfC63K3SGXgAnFdsgkmiq4kATme5BfcqrO8= github.com/cloudflare/cfssl v1.6.4/go.mod h1:8b3CQMxfWPAeom3zBnGJ6sd+G1NkL5TXqmDXacb+1J0= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/elastic/crd-ref-docs v0.0.9 h1:fkkjFPQMIH2U75Ma5AxQkW7NIydxx2tY2uo/A4+xPO0= -github.com/elastic/crd-ref-docs v0.0.9/go.mod h1:k7DCVDJCqaEozDFcnfhTQd/Foxd8Ip18qKNPAgMpzyo= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/elastic/crd-ref-docs v0.0.10 h1:FAc9oCxxY4+rMCLSLtTGrEaPyuxmp3LNlQ+dZfG9Ujc= +github.com/elastic/crd-ref-docs v0.0.10/go.mod h1:zha4djxzWirfx+c4fl/Kmk9Rc7Fv7XBoOi9CL9kne+M= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= @@ -39,8 +38,8 @@ github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -48,10 +47,9 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-errors/errors v1.5.0 h1:/EuijeGOu7ckFxzhkj4CXJ8JaenxK7bKUxpPYqeLHqQ= github.com/go-errors/errors v1.5.0/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= -github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= +github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= @@ -76,8 +74,8 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4 github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= -github.com/goccy/go-yaml v1.11.0 h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54= -github.com/goccy/go-yaml v1.11.0/go.mod h1:H+mJrWtjPTJAHvRbV09MCK9xYwODM+wRTVFFTWckfng= +github.com/goccy/go-yaml v1.11.2 h1:joq77SxuyIs9zzxEjgyLBugMQ9NEgTWxXfz2wVqwAaQ= +github.com/goccy/go-yaml v1.11.2/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -118,12 +116,12 @@ github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -190,8 +188,8 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -277,10 +275,10 @@ github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdO github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rabbitmq/amqp091-go v1.8.1 h1:RejT1SBUim5doqcL6s7iN6SBmsQqyTgXb1xMlH0h1hA= github.com/rabbitmq/amqp091-go v1.8.1/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc= -github.com/rabbitmq/cluster-operator v1.14.0 h1:1/nMyd9v/8T5IHA1BVcWbV0nrzN31F+gLP+0Ges6Y5E= -github.com/rabbitmq/cluster-operator v1.14.0/go.mod h1:7XVU6ngbVJSPDXld+uMVk6nu68GH7fM6yYYY2MdYKek= +github.com/rabbitmq/amqp091-go v1.9.0 h1:qrQtyzB4H8BQgEuJwhmVQqVHB9O4+MNDJCCAcpc3Aoo= +github.com/rabbitmq/cluster-operator/v2 v2.6.0 h1:pr42elurQgi4DVmLTI1cOh8VZRNkfFKZK9+FgQuM/8w= +github.com/rabbitmq/cluster-operator/v2 v2.6.0/go.mod h1:Zryxg5YgbPUFcLSCcKpf10il8kIRAK5HloNo6khhdis= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -294,8 +292,8 @@ github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -333,16 +331,15 @@ github.com/zmap/zlint/v3 v3.1.0/go.mod h1:L7t8s3sEKkb0A2BxGy1IWrxt1ZATa1R4QfJZaQ go.starlark.net v0.0.0-20230912135651-745481cf39ed h1:kNt8RXSIU6IRBO9MP3m+6q3WpyBHQQXqSktcyVKDPOQ= go.starlark.net v0.0.0-20230912135651-745481cf39ed/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -352,9 +349,11 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -368,8 +367,8 @@ golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -397,8 +396,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= @@ -462,8 +461,8 @@ golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -475,8 +474,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -504,8 +503,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= -gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= @@ -556,31 +555,31 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= -k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= -k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= -k8s.io/code-generator v0.28.3 h1:I847QvdpYx7xKiG2KVQeCSyNF/xU9TowaDAg601mvlw= -k8s.io/code-generator v0.28.3/go.mod h1:A2EAHTRYvCvBrb/MM2zZBNipeCk3f8NtpdNIKawC43M= -k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= -k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/code-generator v0.28.4 h1:tcOSNIZQvuAvXhOwpbuJkKbAABJQeyCcQBCN/3uI18c= +k8s.io/code-generator v0.28.4/go.mod h1:OQAfl6bZikQ/tK6faJ18Vyzo54rUII2NmjurHyiN1g4= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d h1:/CFeJBjBrZvHX09rObS2+2iEEDevMWYc1v3aIYAjIYI= -k8s.io/kube-openapi v0.0.0-20230918164632-68afd615200d/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= -k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220217024943-cfd92767d28e h1:Z4+OH6QT2Xy2aqyN5BjyBEGnINrFzkHlMqLCyrE0A+g= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220217024943-cfd92767d28e/go.mod h1:nLkMD2WB4Jcix1qfVuJeOF4j5y/VfyeOIlTxG5Wj9co= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e h1:snPmy96t93RredGRjKfMFt+gvxuVAncqSAyBveJtr4Q= +k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20231121004636-2154ffbc22e2 h1:S1i08nqcuJsCyUBR0jvmKnMLHEbPb74yrVfUoSeuGew= +sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20231121004636-2154ffbc22e2/go.mod h1:TF/lVLWS+JNNaVqJuDDictY2hZSXSsIHCx4FClMvqFg= sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/main.go b/main.go index d102dd2a..79dde46d 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,7 @@ import ( "fmt" "os" "regexp" + "sigs.k8s.io/controller-runtime/pkg/metrics/server" "strconv" "strings" "time" @@ -33,8 +34,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log/zap" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" - "github.com/rabbitmq/cluster-operator/pkg/profiling" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" + "github.com/rabbitmq/cluster-operator/v2/pkg/profiling" topologyv1alpha1 "github.com/rabbitmq/messaging-topology-operator/api/v1alpha1" rabbitmqcomv1beta1 "github.com/rabbitmq/messaging-topology-operator/api/v1beta1" @@ -105,17 +106,33 @@ func main() { usePlainHTTP := getBoolEnv(controllers.ConnectUsingPlainHTTPEnvVar) managerOpts := ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, + Scheme: scheme, + Metrics: server.Options{ + BindAddress: metricsAddr, + }, LeaderElection: true, LeaderElectionNamespace: operatorNamespace, LeaderElectionID: "messaging-topology-operator-leader-election", - Namespace: operatorScopeNamespace, } - if strings.Contains(operatorScopeNamespace, ",") { - managerOpts.Namespace = "" - managerOpts.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(operatorScopeNamespace, ",")) + if operatorScopeNamespace != "" { + // https://github.com/kubernetes-sigs/controller-runtime/blob/main/designs/cache_options.md#only-cache-namespaced-objects-in-the-foo-and-bar-namespace + // Also see https://github.com/rabbitmq/cluster-operator/blob/e2d413c102bc73d4b5e186d1d1b1f9bf728701e1/main.go#L114-L131 + if strings.Contains(operatorScopeNamespace, ",") { + namespaces := strings.Split(operatorScopeNamespace, ",") + managerOpts.Cache = cache.Options{ + DefaultNamespaces: make(map[string]cache.Config), + } + for _, namespace := range namespaces { + managerOpts.Cache.DefaultNamespaces[namespace] = cache.Config{} + } + log.Info("manager configured to watch a list of namespaces", "namespaces", namespaces) + } else { + managerOpts.Cache = cache.Options{ + DefaultNamespaces: map[string]cache.Config{operatorScopeNamespace: {}}, + } + log.Info("manager configured to watch a single namespace", "namespace", operatorScopeNamespace) + } } if syncPeriod := os.Getenv(controllers.ControllerSyncPeriodEnvVar); syncPeriod != "" { @@ -124,7 +141,7 @@ func main() { log.Error(err, "unable to parse provided sync period", "sync period", syncPeriod) os.Exit(1) } - managerOpts.SyncPeriod = &syncPeriodDuration + managerOpts.Cache.SyncPeriod = &syncPeriodDuration log.Info(fmt.Sprintf("sync period set; all resources will be reconciled every: %s", syncPeriodDuration)) } @@ -143,16 +160,10 @@ func main() { managerOpts.RetryPeriod = &retryPeriod } - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), managerOpts) - if err != nil { - log.Error(err, "unable to start manager") - os.Exit(1) - } - if enableDebugPprof, ok := os.LookupEnv("ENABLE_DEBUG_PPROF"); ok { pprofEnabled, err := strconv.ParseBool(enableDebugPprof) if err == nil && pprofEnabled { - mgr, err = profiling.AddDebugPprofEndpoints(mgr) + _, err = profiling.AddDebugPprofEndpoints(&managerOpts) if err != nil { log.Error(err, "unable to add debug endpoints to manager") os.Exit(1) @@ -160,6 +171,12 @@ func main() { } } + mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), managerOpts) + if err != nil { + log.Error(err, "unable to start manager") + os.Exit(1) + } + if err = (&controllers.TopologyReconciler{ Client: mgr.GetClient(), Type: &topology.Queue{}, diff --git a/rabbitmqclient/cluster_reference.go b/rabbitmqclient/cluster_reference.go index 0b8ad06d..fb1ad50d 100644 --- a/rabbitmqclient/cluster_reference.go +++ b/rabbitmqclient/cluster_reference.go @@ -7,7 +7,7 @@ import ( "net/url" "strings" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" topology "github.com/rabbitmq/messaging-topology-operator/api/v1beta1" "gopkg.in/ini.v1" corev1 "k8s.io/api/core/v1" diff --git a/rabbitmqclient/cluster_reference_test.go b/rabbitmqclient/cluster_reference_test.go index df8ea35d..7cc69a18 100644 --- a/rabbitmqclient/cluster_reference_test.go +++ b/rabbitmqclient/cluster_reference_test.go @@ -8,7 +8,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" topology "github.com/rabbitmq/messaging-topology-operator/api/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/rabbitmqclient/rabbitmq_client_factory_test.go b/rabbitmqclient/rabbitmq_client_factory_test.go index 360a553e..fcde4b65 100644 --- a/rabbitmqclient/rabbitmq_client_factory_test.go +++ b/rabbitmqclient/rabbitmq_client_factory_test.go @@ -12,7 +12,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/system_tests/deletion_system_test.go b/system_tests/deletion_system_test.go index cfa39616..23857c46 100644 --- a/system_tests/deletion_system_test.go +++ b/system_tests/deletion_system_test.go @@ -3,7 +3,7 @@ package system_tests import ( "context" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" topology "github.com/rabbitmq/messaging-topology-operator/api/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/system_tests/suite_test.go b/system_tests/suite_test.go index 3cda6d9d..08f05368 100644 --- a/system_tests/suite_test.go +++ b/system_tests/suite_test.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" "k8s.io/apimachinery/pkg/runtime" defaultscheme "k8s.io/client-go/kubernetes/scheme" diff --git a/system_tests/tls_system_test.go b/system_tests/tls_system_test.go index 46cd859d..df20e912 100644 --- a/system_tests/tls_system_test.go +++ b/system_tests/tls_system_test.go @@ -7,7 +7,7 @@ import ( "github.com/google/uuid" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" topology "github.com/rabbitmq/messaging-topology-operator/api/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/system_tests/utils.go b/system_tests/utils.go index 2e626ae7..9285fb39 100644 --- a/system_tests/utils.go +++ b/system_tests/utils.go @@ -16,7 +16,7 @@ import ( rabbithole "github.com/michaelklishin/rabbit-hole/v2" . "github.com/onsi/gomega" - rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/api/v1beta1" + rabbitmqv1beta1 "github.com/rabbitmq/cluster-operator/v2/api/v1beta1" "github.com/rabbitmq/messaging-topology-operator/internal/testutils" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource"