github.com/oam-dev/kubevela@v1.9.11/pkg/controller/core.oam.dev/v1beta1/application/testdata/revision/cd1.yaml (about)

     1  apiVersion: core.oam.dev/v1beta1
     2  kind: ComponentDefinition
     3  metadata:
     4    name: cd1
     5    namespace: vela-system
     6  spec:
     7    workload:
     8      definition:
     9        apiVersion: apps/v1
    10        kind: Deployment
    11    schematic:
    12      cue:
    13        template: |
    14          output: {
    15          	apiVersion: "apps/v1"
    16          	kind:       "Deployment"
    17          	spec: {
    18          		selector: matchLabels: {
    19          			"app.oam.dev/component": context.name
    20          		}
    21  
    22          		template: {
    23          			metadata: labels: {
    24          				"app.oam.dev/component": context.name
    25                          "app.oam.dev/revision": context.appRevision
    26          			}
    27          			spec: {
    28          				containers: [{
    29          					name:  context.name
    30          					image: parameter.image
    31          				}]
    32          			}
    33          		}
    34          	}
    35          }
    36  
    37          parameter: {
    38          	image: string
    39          }