github.com/oam-dev/kubevela@v1.9.11/vela-templates/definitions/internal/workflowstep/export2config.cue (about)

     1  import (
     2  	"vela/op"
     3  )
     4  
     5  "export2config": {
     6  	type: "workflow-step"
     7  	annotations: {
     8  		"category": "Resource Management"
     9  	}
    10  	description: "Export data to specified Kubernetes ConfigMap in your workflow."
    11  }
    12  template: {
    13  	apply: op.#Apply & {
    14  		value: {
    15  			apiVersion: "v1"
    16  			kind:       "ConfigMap"
    17  			metadata: {
    18  				name: parameter.configName
    19  				if parameter.namespace != _|_ {
    20  					namespace: parameter.namespace
    21  				}
    22  				if parameter.namespace == _|_ {
    23  					namespace: context.namespace
    24  				}
    25  			}
    26  			data: parameter.data
    27  		}
    28  		cluster: parameter.cluster
    29  	}
    30  	parameter: {
    31  		// +usage=Specify the name of the config map
    32  		configName: string
    33  		// +usage=Specify the namespace of the config map
    34  		namespace?: string
    35  		// +usage=Specify the data of config map
    36  		data: {}
    37  		// +usage=Specify the cluster of the config map
    38  		cluster: *"" | string
    39  	}
    40  }