What happened?
The function overrides all previous runs instead of adding new keys to the context.
In the case below, I would expect the 2nd run to simply add obj-1 into the context, and leave obj-0 be, so that both obj-0 and obj-1 are present at the end.
How can we reproduce it?
- step: first
functionRef:
name: crossplane-contrib-function-extra-resources
input:
apiVersion: extra-resources.fn.crossplane.io/v1beta1
kind: Input
spec:
policy:
resolution: Required # these are required
extraResources:
- into: obj-0
# ...
- step: second
functionRef:
name: crossplane-contrib-function-extra-resources
input:
apiVersion: extra-resources.fn.crossplane.io/v1beta1
kind: Input
spec:
policy:
resolution: Optional # these are optional
extraResources:
- into: obj-1
# ...
Suggested solution
Load the potentially existing context and insert the new (into) keys. No need to deep-merge.
What happened?
The function overrides all previous runs instead of adding new keys to the context.
In the case below, I would expect the 2nd run to simply add
obj-1into the context, and leaveobj-0be, so that bothobj-0andobj-1are present at the end.How can we reproduce it?
Suggested solution
Load the potentially existing context and insert the new (
into) keys. No need to deep-merge.