github.com/oam-dev/kubevela@v1.9.11/docs/examples/canary-rollout-use-case/first-deploy.yaml (about)

     1  apiVersion: core.oam.dev/v1beta1
     2  kind: Application
     3  metadata:
     4    name: book-info
     5    namespace: default
     6  spec:
     7    components:
     8      - name: reviews
     9        type: webservice
    10        properties:
    11          image: docker.io/istio/examples-bookinfo-reviews-v2:1.16.2
    12          port: 9080
    13          volumes:
    14            - name: wlp-output
    15              type: emptyDir
    16              mountPath: /opt/ibm/wlp/output
    17            - name: tmp
    18              type: emptyDir
    19              mountPath: /tmp
    20  
    21        traits:
    22          - type: canary-traffic
    23            properties:
    24              port:
    25                - 9080
    26  
    27          - type: rollout
    28            properties:
    29              targetSize: 2
    30              # This means to rollout two more replicas in two batches.
    31              rolloutBatches:
    32                - replicas: 2
    33  
    34      - name: productpage
    35        type: webservice
    36        properties:
    37          image: docker.io/istio/examples-bookinfo-productpage-v1:1.16.2
    38          port: 9080
    39  
    40        traits:
    41          - type: expose
    42            properties:
    43              port:
    44                - 9080
    45  
    46          - type: istio-gateway
    47            properties:
    48              hosts:
    49                - "*"
    50              gateway: ingressgateway
    51              match:
    52                - exact: /productpage
    53                - prefix: /static
    54                - exact: /login
    55                - prefix: /api/v1/products
    56              port: 9080
    57  
    58      - name: ratings
    59        type: webservice
    60        properties:
    61          image: docker.io/istio/examples-bookinfo-ratings-v1:1.16.2
    62          port: 9080
    63  
    64        traits:
    65          - type: expose
    66            properties:
    67              port:
    68                - 9080
    69  
    70      - name: details
    71        type: webservice
    72        properties:
    73          image: docker.io/istio/examples-bookinfo-details-v1:1.16.2
    74          port: 9080
    75  
    76        traits:
    77          - type: expose
    78            properties:
    79              port:
    80                - 9080
    81  
    82