apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: testing-app
spec:
  components:
    - name: testing-dryrun
      type: webservice
      properties:
        image: oamdev/hello-world:v1
      traits:
        - type: scaler
          properties:
            replicas: 1
  policies:
    - name: target-default
      type: topology
      properties:
        clusters: [ "local" ]
        namespace: "default"
    - name: target-prod
      type: topology
      properties:
        clusters: [ "local" ]
        namespace: "prod"
    - name: deploy-ha
      type: override
      properties:
        components:
          - type: webservice
            traits:
              - type: scaler
                properties:
                  replicas: 3
  workflow:
    steps:
      - name: deploy2default
        type: deploy
        properties:
          policies: [ "target-default" ]
      - name: deploy2prod
        type: deploy
        properties:
          policies: [ "target-prod", "deploy-ha" ]