自动扩缩容

    本小节会介绍,如何为应用部署计划的一个待交付组件,配置自动扩缩容。我们使用运维特征里的 来完成开发。

    如何使用

    1. # sample.yaml
    2. apiVersion: core.oam.dev/v1beta1
    3. kind: Application
    4. name: website
    5. components:
    6. - name: frontend # This is the component I want to deploy
    7. type: webservice
    8. image: nginx
    9. - type: cpuscaler # Automatically scale the component by CPU usage after deployed
    10. properties:
    11. min: 1
    12. cpuPercent: 60