diff --git a/api/v1alpha1/mongodbprovider_types.go b/api/v1alpha1/mongodbprovider_types.go index 2945648..540553b 100644 --- a/api/v1alpha1/mongodbprovider_types.go +++ b/api/v1alpha1/mongodbprovider_types.go @@ -115,8 +115,8 @@ type MongoDBProviderStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// MongoDBDProvider is the Schema for the mongodbproviders API -type MongoDBDProvider struct { +// MongoDBProvider is the Schema for the mongodbproviders API +type MongoDBProvider struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -130,9 +130,9 @@ type MongoDBDProvider struct { type MongoDBProviderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []MongoDBDProvider `json:"items"` + Items []MongoDBProvider `json:"items"` } func init() { - SchemeBuilder.Register(&MongoDBDProvider{}, &MongoDBProviderList{}) + SchemeBuilder.Register(&MongoDBProvider{}, &MongoDBProviderList{}) } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 9e4de90..825d9b3 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -271,7 +271,7 @@ func (in *MongoDBConnection) DeepCopy() *MongoDBConnection { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MongoDBDProvider) DeepCopyInto(out *MongoDBDProvider) { +func (in *MongoDBProvider) DeepCopyInto(out *MongoDBProvider) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -279,18 +279,18 @@ func (in *MongoDBDProvider) DeepCopyInto(out *MongoDBDProvider) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBDProvider. -func (in *MongoDBDProvider) DeepCopy() *MongoDBDProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBProvider. +func (in *MongoDBProvider) DeepCopy() *MongoDBProvider { if in == nil { return nil } - out := new(MongoDBDProvider) + out := new(MongoDBProvider) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MongoDBDProvider) DeepCopyObject() runtime.Object { +func (in *MongoDBProvider) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -304,7 +304,7 @@ func (in *MongoDBProviderList) DeepCopyInto(out *MongoDBProviderList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]MongoDBDProvider, len(*in)) + *out = make([]MongoDBProvider, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/config/crd/bases/crd.lagoon.sh_mongodbdproviders.yaml b/config/crd/bases/crd.lagoon.sh_mongodbdproviders.yaml index fc307f0..aae00c2 100644 --- a/config/crd/bases/crd.lagoon.sh_mongodbdproviders.yaml +++ b/config/crd/bases/crd.lagoon.sh_mongodbdproviders.yaml @@ -4,20 +4,20 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: mongodbdproviders.crd.lagoon.sh + name: mongodbproviders.crd.lagoon.sh spec: group: crd.lagoon.sh names: - kind: MongoDBDProvider - listKind: MongoDBDProviderList - plural: mongodbdproviders - singular: mongodbdprovider + kind: MongoDBProvider + listKind: MongoDBProviderList + plural: mongodbproviders + singular: mongodbprovider scope: Namespaced versions: - name: v1alpha1 schema: openAPIV3Schema: - description: MongoDBDProvider is the Schema for the mongodbproviders API + description: MongoDBProvider is the Schema for the mongodbproviders API properties: apiVersion: description: |- diff --git a/config/crd/bases/crd.lagoon.sh_mongodbproviders.yaml b/config/crd/bases/crd.lagoon.sh_mongodbproviders.yaml index fc307f0..aae00c2 100644 --- a/config/crd/bases/crd.lagoon.sh_mongodbproviders.yaml +++ b/config/crd/bases/crd.lagoon.sh_mongodbproviders.yaml @@ -4,20 +4,20 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: mongodbdproviders.crd.lagoon.sh + name: mongodbproviders.crd.lagoon.sh spec: group: crd.lagoon.sh names: - kind: MongoDBDProvider - listKind: MongoDBDProviderList - plural: mongodbdproviders - singular: mongodbdprovider + kind: MongoDBProvider + listKind: MongoDBProviderList + plural: mongodbproviders + singular: mongodbprovider scope: Namespaced versions: - name: v1alpha1 schema: openAPIV3Schema: - description: MongoDBDProvider is the Schema for the mongodbproviders API + description: MongoDBProvider is the Schema for the mongodbproviders API properties: apiVersion: description: |- diff --git a/internal/controller/mongodbprovider_controller.go b/internal/controller/mongodbprovider_controller.go index 28a2d9d..16f9a19 100644 --- a/internal/controller/mongodbprovider_controller.go +++ b/internal/controller/mongodbprovider_controller.go @@ -96,7 +96,7 @@ func (r *MongoDBProviderReconciler) Reconcile(ctx context.Context, req ctrl.Requ logger := log.FromContext(ctx).WithName("mongodbprovider_controller") logger.Info("Reconciling MongoDBProvider") - instance := &crdv1alpha1.MongoDBDProvider{} + instance := &crdv1alpha1.MongoDBProvider{} if err := r.Get(ctx, req.NamespacedName, instance); err != nil { if client.IgnoreNotFound(err) == nil { logger.Info("MongoDBProvider resource not found. Ignoring since object must be deleted") @@ -269,7 +269,7 @@ func (r *MongoDBProviderReconciler) Reconcile(ctx context.Context, req ctrl.Requ func (r *MongoDBProviderReconciler) handleError( ctx context.Context, - instance *crdv1alpha1.MongoDBDProvider, + instance *crdv1alpha1.MongoDBProvider, promErr string, err error, ) (ctrl.Result, error) { @@ -310,7 +310,7 @@ func (r *MongoDBProviderReconciler) SetupWithManager(mgr ctrl.Manager) error { ) r.Recorder = mgr.GetEventRecorderFor("mongodbprovider-controller") return ctrl.NewControllerManagedBy(mgr). - For(&crdv1alpha1.MongoDBDProvider{}). + For(&crdv1alpha1.MongoDBProvider{}). WithEventFilter(predicate.GenerationChangedPredicate{}). // Only allow one reconcile at a time WithOptions(controller.Options{ diff --git a/internal/controller/mongodbprovider_controller_test.go b/internal/controller/mongodbprovider_controller_test.go index 8c44fb1..6159cb3 100644 --- a/internal/controller/mongodbprovider_controller_test.go +++ b/internal/controller/mongodbprovider_controller_test.go @@ -43,7 +43,7 @@ var _ = Describe("MongoDBProvider Controller", func() { Name: resourceName, Namespace: "default", } - mongodbprovider := &crdv1alpha1.MongoDBDProvider{} + mongodbprovider := &crdv1alpha1.MongoDBProvider{} BeforeEach(func() { By("creating the custom resource for the Kind MongoDBProvider") @@ -68,7 +68,7 @@ var _ = Describe("MongoDBProvider Controller", func() { err = k8sClient.Get(ctx, typeNamespacedName, mongodbprovider) if err != nil && errors.IsNotFound(err) { - resource := &crdv1alpha1.MongoDBDProvider{ + resource := &crdv1alpha1.MongoDBProvider{ ObjectMeta: metav1.ObjectMeta{ Name: resourceName, Namespace: "default", @@ -95,7 +95,7 @@ var _ = Describe("MongoDBProvider Controller", func() { AfterEach(func() { // TODO(user): Cleanup logic after each test, like removing the resource instance. - resource := &crdv1alpha1.MongoDBDProvider{} + resource := &crdv1alpha1.MongoDBProvider{} err := k8sClient.Get(ctx, typeNamespacedName, resource) Expect(err).NotTo(HaveOccurred())