github.com/oam-dev/kubevela@v1.9.11/references/docgen/def-doc/trait/lifecycle.eg.md (about)

     1  ```yaml
     2  apiVersion: core.oam.dev/v1beta1
     3  kind: Application
     4  metadata:
     5    name: application-with-lifecycle
     6  spec:
     7    components:
     8      - name: busybox-runner
     9        type: worker
    10        properties:
    11          image: busybox
    12          cmd:
    13            - sleep
    14            - '1000'
    15        traits:
    16          - type: lifecycle
    17            properties:
    18              postStart:
    19                exec:
    20                  command:
    21                    - echo
    22                    - 'hello world'
    23              preStop:
    24                httpGet:
    25                  host: "www.aliyun.com"
    26                  scheme: "HTTPS"
    27                  port: 443
    28  ```