Supported since 3.9
It's common in deployments that there is a need to support multiple intents for the same kind. If there is also need to support synchronization/reconciliation for each of them it is needed to configure appropriate object synchronization part for each of them. Sometimes it can lead to huge resource configuration with complex and non-trivial queries in synchronization condition. With supporting many intents there must be synchronization condition for each of them to find out if the currently processed resource object satisfy constraints for this intent. It cannot be expected that the kind/intent are know. It must be expected that the kind/intent will be determined according to the conditions in the object synchronization part. Since 3.9 there is possibility to specify one sorter instead of specifying conditions for each intent. The main goal of the sorter is to divide resource objects to appropriate kind/intent so then the appropriate object synchronization can take part and perform specified actions. The example of such sorter can be found bellow:
The most important part in the example above is the expression. This expression is used to divide resource objects to the appropriate kind/intent. It can also specify focus and synchronization situation. The expected result of the expression is an ObjectSynchronizationDiscriminatorType:
The resulting kind of the resource object. According to this kind specification appropriate objectSynchronization is chosen.
The resulting intent of the resource object. According to this intent specification appropriate objectSynchronization is chosen.
The synchronization situation for the resource object. If set, reaction for the situation is found and the actions are run.
The owner of the resource object if known.
All properties are optional. If they are not set by the expression, they are computed by original way using object synchronization parts..