Skip to content

Commit adfce38

Browse files
committed
update readme
1 parent d20482f commit adfce38

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,23 @@ identity:
366366
```
367367

368368
## Operations support
369-
function-msgraph support every kind of [operations](https://docs.crossplane.io/latest/operations/operation/), however CronOperations and WatchOperations are the most useful in context of graph queries.
370-
Check [examples](./example/operations/)
369+
function-msgraph support every kind of [operations](https://docs.crossplane.io/latest/operations/operation/) but it only allows targeting Composite Resources
370+
Function omits the input.skipQueryWhenTargetHasData parameter when running in operation mode to enforce compability with Cron/Watch modes.
371+
CronOperations and WatchOperations are the most useful in context of graph queries, please check [examples](./example/operations/).
372+
373+
### Operations results
374+
function-msgraph operations result in two annotations set on the XR:
375+
```yaml
376+
apiVersion: "example.org/v1"
377+
kind: XR
378+
metadata:
379+
name: "cool-xr"
380+
annotations:
381+
"function-msgraph/last-execution": "2025-01-01T00:00:00+01:00"
382+
"function-msgraph/last-execution-query-drift-detected": "false"
383+
```
384+
function-msgraph/last-execution sets RFC3339 timestamp informing about last succesful Operation run.
385+
function-msgraph/last-execution-query-drift-detected sets a boolean if there's a drift between input.target field's value and query result, which is used by function-msgraph in Composition context for self-healing. skipQueryWhenTargetHasData input parameter is ommited when drift detected annotation is set which leads to XR update and after that next Operation run sets the annotation back to "false".
371386

372387
### CronOperation
373388
CronOperation may be used to forcefully update XR's status in a predefined interval.
@@ -401,7 +416,6 @@ spec:
401416
402417
403418
target: "status.validatedUsers"
404-
skipQueryWhenTargetHasData: false # Always query even if data is in status
405419
credentials:
406420
- name: azure-creds
407421
source: Secret
@@ -447,7 +461,6 @@ spec:
447461
448462
449463
target: "status.validatedUsers"
450-
skipQueryWhenTargetHasData: false # Always query even if data is in status
451464
credentials:
452465
- name: azure-creds
453466
source: Secret

example/operations/cronoperation.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ spec:
2424
2525
2626
target: "status.validatedUsers"
27-
skipQueryWhenTargetHasData: false # Always query even if data is in status
2827
credentials:
2928
- name: azure-creds
3029
source: Secret

example/operations/operation.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ spec:
1919
2020
2121
target: "status.validatedUsers"
22-
skipQueryWhenTargetHasData: false # Always query even if data is in status
2322
credentials:
2423
- name: azure-creds
2524
source: Secret

example/operations/watchoperation.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ spec:
2626
2727
2828
target: "status.validatedUsers"
29-
skipQueryWhenTargetHasData: false # Always query even if data is in status
3029
credentials:
3130
- name: azure-creds
3231
source: Secret

0 commit comments

Comments
 (0)