github.com/oam-dev/kubevela@v1.9.11/references/docgen/def-doc/workflowstep/depends-on-app.eg.md (about)

     1  ```yaml
     2  apiVersion: core.oam.dev/v1beta1
     3  kind: Application
     4  metadata:
     5    name: first-vela-workflow
     6    namespace: default
     7  spec:
     8    components:
     9    - name: express-server
    10      type: webservice
    11      properties:
    12        image: oamdev/hello-world
    13        port: 8000
    14      traits:
    15      - type: ingress
    16        properties:
    17          domain: testsvc.example.com
    18          http:
    19            /: 8000
    20    workflow:
    21      steps:
    22        - name: express-server
    23          type: depends-on-app
    24          properties:
    25            name: another-app
    26            namespace: default
    27  ```
    28  
    29  `depends-on-app` will check if the cluster has the application with `name` and `namespace` given in properties.
    30  If the application exists, it will hang the next step until the application is running.
    31  If the application does not exist, KubeVela will check the ConfigMap with the same name, and read the config of the Application and apply to cluster.
    32  The ConfigMap is like below: the `name` and `namespace` of the ConfigMap is the same in properties.
    33  In data, the `key` must be specified by `application`, and the `value` is the yaml of the deployed application yaml.
    34  
    35  ```yaml
    36  apiVersion: v1
    37  kind: ConfigMap
    38  metadata:
    39    name: myapp
    40    namespace: vela-system
    41  data:
    42    application: 
    43      <app yaml file>
    44  ```