Skip to content

Commit ddef4bd

Browse files
Update README.md
Co-authored-by: Yury Tsarev <yury@upbound.io>
1 parent adfce38 commit ddef4bd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,22 @@ identity:
369369
function-msgraph support every kind of [operations](https://docs.crossplane.io/latest/operations/operation/) but it only allows targeting Composite Resources
370370
Function omits the input.skipQueryWhenTargetHasData parameter when running in operation mode to enforce compability with Cron/Watch modes.
371371
CronOperations and WatchOperations are the most useful in context of graph queries, please check [examples](./example/operations/).
372+
### Operations and Compositions Working Together
372373

374+
**Important**: Operations and Compositions work in conjunction to provide a self-healing mechanism:
375+
376+
1. **Operations Role (Drift Detection)**:
377+
- Query Microsoft Graph API on schedule/watch events
378+
- Compare results with current XR status
379+
- Set drift detection annotations (but don't update status directly)
380+
381+
2. **Compositions Role (Drift Correction)**:
382+
- Run when XR is reconciled (triggered by annotation changes)
383+
- Check drift detection annotation
384+
- If drift detected, ignore `skipQueryWhenTargetHasData` flag and update status
385+
- Reset drift annotation to "false" after successful update
386+
387+
This creates a **two-phase self-healing system** where Operations monitor for changes and Compositions perform the actual data updates.
373388
### Operations results
374389
function-msgraph operations result in two annotations set on the XR:
375390
```yaml

0 commit comments

Comments
 (0)