# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/export2secret.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
  annotations:
    definition.oam.dev/description: Export data to secret for your workflow steps
  name: export2secret
  namespace: {{.Values.systemDefinitionNamespace}}
spec:
  schematic:
    cue:
      template: |
        import (
        	"vela/op"
        )

        apply: op.#Apply & {
        	value: {
        		apiVersion: "v1"
        		kind:       "Secret"
        		if parameter.type != _|_ {
        			type: parameter.type
        		}
        		metadata: {
        			name: parameter.secretName
        			if parameter.namespace != _|_ {
        				namespace: parameter.namespace
        			}
        			if parameter.namespace == _|_ {
        				namespace: context.namespace
        			}
        		}
        		stringData: parameter.data
        	}
        }
        parameter: {
        	// +usage=Specify the name of the secret
        	secretName: string
        	// +usage=Specify the namespace of the secret
        	namespace?: string
        	// +usage=Specify the type of the secret
        	type?: string
        	// +usage=Specify the data of secret
        	data: {}
        }

