Deploy

The deploy workflow step permits to apply policies when deploying the application. This step could be useful in situations where more than one policy is defined in an application, and its application depends on the result of a workflow step. Orchestrating component deployments can also be done with the apply-application, apply-application-in-paralell steps.

The following snippet shows an application with a policy and a workflow step using that policy to deploy the application. Notice that by default all policies are applied to the application.

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: my-app
  annotations: 
    version: "v0.0.1"
    description: "My override application"
spec:
  components:
    - name: my-component
      type: worker
      properties:
        image: my-app-image:v1.0.0
        cmd: ["cmd"]     
        cpu: "0.25"
        memory: "200Mi"
  policies:
    - name: policy-name # Policy Name
      type: override 
      properties:
        components:
          - name: my-component # (Optional) Name of the component to override. If empty, all components will be merged
            properties: # (Optional) Properties
              image: my-app-image:v2.0.0 # patch the image (p.e.)
  workflow:
    steps:      
      - type: deploy # Set to deploy
        name: deploy-test 
        properties:
          auto: true # (Optional) If false, the workflow will be suspend before the step. True by default
          policies: ["policy-name"] # Policies used for this step
          parallelism: 5 # (Optional) Maximum number of concurrent delivered components. 5 by default
          ignoreTerraformComponent: true # (Optional) If false, the step will apply the components with terraform workload. True by default