Link Search Menu Expand Document

Apply application in parallel

The apply-application-in-parallel workflow step deploys the rendered Kubernetes component in parallel. This could speedup deployment time for applications where components are not dependent among themselves.

The following snippet shows an application with two components that will be deployed in parallel.

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: my-app
  annotations: 
    version: "v0.0.1"
    description: "My apply-application-in-parallel"
spec:
  components:
    - name: component1
      type: worker
      properties:
        image: my-app-image:v1.0.0
        cmd: ["cmd"]     
        cpu: "0.25"
        memory: "200Mi"
    - name: component2
      type: worker
      properties:
        image: my-app-image:v1.0.0
        cmd: ["cmd"]     
        cpu: "0.25"
        memory: "200Mi"
      traits:
        - type: scaler
          properties:
            replicas: 1
  workflow:
    steps:
    - name: apply-app
      # Apply all the traits and the components in an application
      type: apply-application-in-parallel # Set to apply-application-in-parallel
      # No arguments required