Skip to content

Commit

Permalink
Update docs/book/src/reference/good-practices.md
Browse files Browse the repository at this point in the history
Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com>
  • Loading branch information
Sajiyah-Salat and camilamacedo86 committed May 16, 2023
1 parent 317109b commit 5760ee6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/book/src/reference/good-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,23 @@ Avoid a design solution where the same controller reconciles more than one Kind.

## Why You Should Adopt Status Conditions

We recommends you to manage your solutions using Status Conditionals. You can check the scaffold provided via the [deploy-image][deploy-image] as an example for its implementation.
We recommend you manage your solutions using Status Conditionals following the [K8s Api conventions][k8s-aoi-convetions] because:

- **Standardization**: Conditions provide a standardized way to represent the state of an Operator's custom resources, making it easier for users and tools to understand and interpret the resource's status.
- **Readability**: Conditions can clearly express complex states by using a combination of multiple conditions, making it easier for users to understand the current state and progress of the resource.
- **Extensibility**: As new features or states are added to your Operator, conditions can be easily extended to represent these new states without requiring significant changes to the existing API or structure.
- **Observability**: Status conditions can be monitored and tracked by cluster administrators and external monitoring tools, enabling better visibility into the state of the custom resources managed by the Operator.
- **Compatibility**: By adopting the common pattern of using conditions in Kubernetes APIs, Operator authors ensure their custom resources align with the broader ecosystem, which helps users to have a consistent experience when interacting with multiple Operators and resources in their clusters.

<aside class="note">
<h1> Example of Usage </h1>

Check out the [Deploy Image Plugin][deploy-image-plugin]. This plugin allows users to scaffold API/Controllers to deploy and manage an Operand (image) on the cluster following the guidelines and best practices. It abstracts the
complexities of achieving this goal while allowing users to customize the generated code.

Therefore, you can check an example of Status Conditional usage by looking at its API(s) scaffolded and code implemented under the Reconciliation into its Controllers.

</aside>

Additionally, we recommend checking the documentation on [Operator patterns][operator-pattern] from Kubernetes to better understand the purpose of the standard solutions that are built with KubeBuilder.

Expand Down

0 comments on commit 5760ee6

Please sign in to comment.