Skip to content

Commit

Permalink
Space added
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajiyah-Salat committed Jun 15, 2023
1 parent fe0fd06 commit 354b87f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/book/src/reference/good-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ In conclusion, while it might seem efficient to have a single controller manage
## Why is it recommended to avoid a scenario where multiple controllers are updating the same Custom Resource (CR)?

Managing a single Custom Resource (CR) with multiple controllers can lead to several challenges:

- **Race conditions**: When multiple controllers attempt to reconcile the same CR concurrently, race conditions can emerge. These conditions can produce inconsistent or unpredictable outcomes. For example, if we try to update the CR to add a status condition, we may encounter a range of errors such as “the object has been modified; please apply your changes to the latest version and try again”, triggering a repetitive reconciliation process.
- **Concurrency issues**: When controllers have different interpretations of the CR’s state, they may constantly overwrite each other’s changes. This conflict can create a loop, with the controllers ceaselessly disputing the CR’s state.
- **Maintenance and support difficulties**: Coordinating the logic for multiple controllers operating on the same CR can increase system complexity, making it more challenging to understand or troubleshoot. Typically, a system’s behavior is easier to comprehend when each CR is managed by a single controller.
Expand Down

0 comments on commit 354b87f

Please sign in to comment.