Apply component

The apply-component workflow step deploys a single component from the application. This step is useful when orchestrating the deployment with dependencies and/or modifications. For other approaches to deploy the components check apply-application, apply-application-in-parallel, apply-remaining, and deploy.

The following snippet shows an application using the apply-component workflow step to deploy one component after the other.

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: my-app
spec:
  components:
    - name: component1
      type: worker
      properties:
        image: my-app-image:v1.0.0     
    - name: component2
      type: worker
      properties:
        image: my-app-image:v1.0.0
  workflow:
    steps:
    # set the components deploy steps
    - name: step1
      type: apply-component # set to apply-component
      properties:
        component: component2 # (Required) component name
    - name: step2
      type: apply-component # set to apply-component
      properties:
        component: component1 # (Required) component name