Version: v1.0

Rollout Plan

In this documentation, we will show how to use the rollout plan to rolling update an application.

Overview

By default, when we update the properties of application, KubeVela will update the underlying instances directly. The availability of the application will be guaranteed by rollout traits (if any).

Though KubeVela also provides a rolling style update mechanism, you can specify the spec.rolloutPlan in application to do so.

Example

  1. Deploy application to the cluster

    1. apiVersion: core.oam.dev/v1beta1
    2. kind: Application
    3. metadata:
    4. name: test-rolling
    5. spec:
    6. components:
    7. - name: metrics-provider
    8. type: worker
    9. properties:
    10. cmd:
    11. - ./podinfo
    12. - stress-cpu=1.0
    13. image: stefanprodan/podinfo:4.0.6
    14. port: 8080
    15. rolloutPlan:
    16. rolloutStrategy: "IncreaseFirst"
    17. rolloutBatches:
    18. - replicas: 50%
    19. - replicas: 50%
    20. targetSize: 6
  2. User can modify the application container command and apply

    1. apiVersion: core.oam.dev/v1beta1
    2. kind: Application
    3. metadata:
    4. name: test-rolling
    5. spec:
    6. components:
    7. - name: metrics-provider
    8. type: worker
    9. properties:
    10. cmd:
    11. - ./podinfo
    12. - stress-cpu=2.0
    13. image: stefanprodan/podinfo:4.0.6
    14. port: 8080
    15. rolloutPlan:
    16. rolloutStrategy: "IncreaseFirst"
    17. rolloutBatches:
    18. - replicas: 50%
    19. - replicas: 50%
    20. targetSize: 6

User can check the status of the application and see the rollout completes, and the application’s status.rollout.rollingState becomes rolloutSucceed.