diff --git a/README.md b/README.md index b0981d6..496b48e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # basereconciler -Basereconciler is an attempt to create a reconciler that can be imported an used in any controller-runtime based controller to perform the most common tasks a controller usually performs. It's a bunch of code that it's typically written again and again for every and each controller and that can be abstracted to work in a more generic way to avoid the repetition and improve code mantainability. +Basereconciler is an attempt to create a reconciler that can be imported and used in any controller-runtime based controller to perform the most common tasks a controller usually performs. It's a bunch of code that it's typically written again and again for every and each controller and that can be abstracted to work in a more generic way to avoid the repetition and improve code mantainability. At the moment basereconciler can perform the following tasks: * **Get the custom resource and perform some common tasks on it**: * Management of resource finalizer: some custom resources required more complex finalization logic. For this to happen a finalizer must be in place. Basereconciler can keep this finalizer in place and remove it when necessary during resource finalization. * Management of finalization logic: it checks if the resource is being finalized and executed the finalization logic passed to it if that is the case. When all finalization logic is completed it removes the finalizer on the custom resource. -* **Reconcile resources owned by the custom resource**: basreconciler can keep the owned resources of a custom resource in it's desired state. It works for any resource type, and only requires that the user configures how each specific resource type has to be configured. The resource reconciler only works in "update mode" right now, so any operation to transition a given resource from its live state to its desired state will be an Update. We might add a "patch mode" in the future. +* **Reconcile resources owned by the custom resource**: basereconciler can keep the owned resources of a custom resource in it's desired state. It works for any resource type, and only requires that the user configures how each specific resource type has to be configured. The resource reconciler only works in "update mode" right now, so any operation to transition a given resource from its live state to its desired state will be an Update. We might add a "patch mode" in the future. * **Reconcile custom resource status**: if the custom resource implements a certain interface, basereconciler can also be in charge of reconciling the status. -* **Resource pruner**: when the reconciler stops seeing a certain resource, owned by the custom resource, it will prune them as it understands that the resource is no logner required. The resource pruner can be disabled globally or enabled/disabled on a per resource basis based on an annotation. +* **Resource pruner**: when the reconciler stops seeing a certain resource, owned by the custom resource, it will prune them as it understands that the resource is no longer required. The resource pruner can be disabled globally or enabled/disabled on a per resource basis based on an annotation. ## Basic Usage diff --git a/resource/create_or_update.go b/resource/create_or_update.go index 26dafa8..3bac2dc 100644 --- a/resource/create_or_update.go +++ b/resource/create_or_update.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) -// CreateOrUpdate cretes or updates resources. The function receives several paremters: +// CreateOrUpdate cretes or updates resources. The function receives several parameters: // - ctx: the context. The logger is expected to be within the context, otherwise the function won't // produce any logs. // - cl: the kubernetes API client diff --git a/resource/template.go b/resource/template.go index 8a41e87..1b720b3 100644 --- a/resource/template.go +++ b/resource/template.go @@ -34,7 +34,7 @@ type Template[T client.Object] struct { // object. TemplateBuilder TemplateBuilderFunction[T] // TemplateMutations are functions that are called during Build() after - // TemplateBuilder has ben invoked, to perform mutations on the object that require + // TemplateBuilder has been invoked, to perform mutations on the object that require // access to a kubernetes API server. TemplateMutations []TemplateMutationFunction // IsEnabled specifies whether the resourse described by this Template should