github.com/oam-dev/kubevela@v1.9.11/docs/examples/workflow/rollout/first-scale.yaml (about)

     1  apiVersion: core.oam.dev/v1beta1
     2  kind: Application
     3  metadata:
     4    name: rollout-multi-comp
     5    namespace: default
     6  spec:
     7    components:
     8      - name: back-end
     9        externalRevision: backend-v1
    10        type: webservice
    11        properties:
    12          image: nginx:1.21
    13          port: 80
    14        traits:
    15          - type: rollout
    16            properties:
    17              targetSize: 2
    18              # This means to rollout two more replicas in two batches.
    19              rolloutBatches:
    20                - replicas: 1
    21                - replicas: 1
    22  
    23      - name: front-end
    24        externalRevision: front-end-v1
    25        type: webservice
    26        properties:
    27          image: node:16.7-alpine3.12
    28          port: 80
    29        traits:
    30          - type: rollout
    31            properties:
    32              targetSize: 4
    33              # This means to rollout two more replicas in two batches.
    34              rolloutBatches:
    35                - replicas: 2
    36                - replicas: 2
    37  
    38    workflow:
    39      steps:
    40       # rollout back-end component first, workflow will block until  rollout succeed
    41        - name: rollout-back-end
    42          type: rollout-wait-succeed
    43          properties:
    44            appName: rollout-multi-comp
    45            component: back-end
    46  
    47       # rollout front-end component
    48        - name: rollout-front-end
    49          type: rollout-wait-succeed
    50          properties:
    51            appName: rollout-multi-comp
    52            component: front-end
    53