crossplane-contrib / function-sequencer

Crossplane composition function to define sequencing rules delaying the creation of resources until other resources are ready.
Apache License 2.0
8 stars 3 forks source link

Nested sequences or concurrency groups #20

Open danielloader opened 5 months ago

danielloader commented 5 months ago

What problem are you facing?

I'd like to have a sequence that waits for a VPCEndpoint object to be created, then simultaneously create many VPCEndpointSubnetAssociations and VPCEndpointSecurityGroupAssociations, without having to define many sequences that all end in a singular object after a VPCEndpoint object.

How could this Function help solve your problem?

    - step: sequence-creation
      functionRef:
        name: function-sequencer
      input:
        apiVersion: sequencer.fn.crossplane.io/v1beta1
        kind: Input
        rules:
          - sequence:
            - project
            - endpoint
            - vpcEndpoint
            - group:
              - vpcEndpointSubnetAssociation-0
              - vpcEndpointSubnetAssociation-1
              - vpcEndpointSubnetAssociation-2
              - vpcEndpointSecurityGroupAssociation
            - endpointService

As an initial spitball idea, but the idea of reserving 'group' as a resource name for this functionality feels a bit cludgy.

Since this effectively a function to form a DAG of operations, something that allows DAG like functionality would be welcome!

Thanks