Define Application Health Probe

    1. Create an application with the health scope
    1. kind: Application
    2. metadata:
    3. name: vela-app
    4. spec:
    5. components:
    6. - name: express-server
    7. type: webservice
    8. properties:
    9. image: crccheck/hello-world
    10. port: 8080 # change port
    11. cpu: 0.5 # add requests cpu units
    12. scopes:
    13. healthscopes.core.oam.dev: health-check
    1. Check app status, will see health scope in status.service.scopes
    1. apiVersion: core.oam.dev/v1beta1
    2. name: vela-app
    3. ...
    4. status:
    5. ...
    6. services:
    7. - healthy: true
    8. name: express-server
    9. scopes:
    10. - apiVersion: core.oam.dev/v1alpha2
    11. kind: HealthScope
    12. name: health-check
    1. apiVersion: core.oam.dev/v1alpha2
    2. kind: HealthScope
    3. metadata:
    4. name: health-check
    5. ...
    6. probe-interval: 60
    7. workloadRefs:
    8. - apiVersion: apps/v1
    9. kind: Deployment
    10. name: express-server
    11. status:
    12. healthConditions:
    13. - componentName: express-server
    14. diagnosis: 'Ready:1/1 '
    15. healthStatus: HEALTHY
    16. targetWorkload:
    17. apiVersion: apps/v1
    18. kind: Deployment
    19. name: express-server
    20. scopeHealthCondition:
    21. healthStatus: HEALTHY