Skip to content

Commit

Permalink
Fix typos in doc
Browse files Browse the repository at this point in the history
Co-authored-by: Sergio López <[email protected]>
  • Loading branch information
roivaz and slopezz authored Dec 20, 2023
1 parent 124455b commit 533edab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion resource/create_or_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion resource/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 533edab

Please sign in to comment.