github.com/kubevela/workflow@v0.6.0/charts/vela-workflow/templates/definitions/export2config.yaml (about)

     1  # Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
     2  # Definition source cue file: vela-templates/definitions/internal/export2config.cue
     3  apiVersion: core.oam.dev/v1beta1
     4  kind: WorkflowStepDefinition
     5  metadata:
     6    annotations:
     7      definition.oam.dev/description: Export data to specified Kubernetes ConfigMap in your workflow.
     8    labels:
     9      custom.definition.oam.dev/ui-hidden: "true"
    10    name: export2config
    11    namespace: {{ include "systemDefinitionNamespace" . }}
    12  spec:
    13    schematic:
    14      cue:
    15        template: |
    16          import (
    17          	"vela/op"
    18          )
    19  
    20          apply: op.#Apply & {
    21          	value: {
    22          		apiVersion: "v1"
    23          		kind:       "ConfigMap"
    24          		metadata: {
    25          			name: parameter.configName
    26          			if parameter.namespace != _|_ {
    27          				namespace: parameter.namespace
    28          			}
    29          			if parameter.namespace == _|_ {
    30          				namespace: context.namespace
    31          			}
    32          		}
    33          		data: parameter.data
    34          	}
    35          	cluster: parameter.cluster
    36          }
    37          parameter: {
    38          	// +usage=Specify the name of the config map
    39          	configName: string
    40          	// +usage=Specify the namespace of the config map
    41          	namespace?: string
    42          	// +usage=Specify the data of config map
    43          	data: {}
    44          	// +usage=Specify the cluster of the config map
    45          	cluster: *"" | string
    46          }
    47