You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -369,7 +369,22 @@ identity:
369
369
function-msgraph support every kind of [operations](https://docs.crossplane.io/latest/operations/operation/) but it only allows targeting Composite Resources
370
370
Function omits the input.skipQueryWhenTargetHasData parameter when running in operation mode to enforce compability with Cron/Watch modes.
371
371
CronOperations and WatchOperations are the most useful in context of graph queries, please check [examples](./example/operations/).
372
+
### Operations and Compositions Working Together
372
373
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.
373
388
### Operations results
374
389
function-msgraph operations result in two annotations set on the XR:
0 commit comments