github.com/oam-dev/kubevela@v1.9.11/references/docgen/testdata/websvcComponentDef.yaml (about)

     1  apiVersion: core.oam.dev/v1beta1
     2  kind: ComponentDefinition
     3  metadata:
     4    name: webservice.testapps
     5    labels:
     6      usecase: forplugintest
     7  spec:
     8    workload:
     9      definition:
    10        apiVersion: apps/v1
    11        kind: Deployment
    12    extension:
    13      template: |
    14        output: {
    15          apiVersion: "apps/v1"
    16          kind:       "Deployment"
    17          metadata: name: context.name
    18          spec: {
    19            replicas: 1
    20            podSpec: {
    21              containers: [{
    22                name:  context.name
    23                image: parameter.image
    24                env: parameter.env
    25                ports: [{
    26                  containerPort: parameter.port
    27                }]
    28              }]
    29            }
    30          }
    31        }
    32        parameter: {
    33          // +usage=Which image would you like to use for your service
    34          // +short=i
    35          image: string
    36  
    37          // +usage=Which port do you want customer traffic sent to
    38          // +short=p
    39          port:  *6379 | int
    40  
    41          env: [...{
    42            name:  string
    43            value?: string
    44            valueFrom?: {
    45              secretKeyRef: {
    46                name: string
    47                key: string
    48              }
    49            }
    50          }]
    51        }