apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: workflow-demo
  namespace: default
spec:
  components:
    - name: podinfo-server
      type: webservice
      properties:
        image: stefanprodan/podinfo:5.2.1
        port: 9898
      traits:
        - type: expose
          properties:
            port: [9898]

  policies:
    - name: prod-env
      type: env-binding
      properties:
        engine: ocm
        envs:
          - name: prod
            patch:
              components:
                - name: podinfo-server
                  type: webservice
                  properties:
                    image: stefanprodan/podinfo:6.0.0
                    port: 9898
                  traits:
                    - type: expose
                      properties:
                        port: [9898]
                        type: LoadBalancer
            placement:
              clusterSelector:
                labels:
                  purpose: test

  workflow:
    steps:
      - name: deploy-server
        type: mutil-env
        properties:
          env:       prod
          policy:    prod-env