mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-25 02:33:13 +00:00
* Feat: add components and storage api-oriented defs * add some examples * change the dir * resolve comments * make reviewable * fix example * add labels and annotations in component * add config map ref key in env * add more traits * add wfstep defs and rename * fmt the cue * re-struct all the definitions * revert deprecated defs and add webhook def * delete useless network trait * fix generated tab * fix indent * fix webservice * add labels * comment webservice and worker's health check * fix retainkeys * fix webservice and worker's health check * add suspend def which will be replaced by internal def * fix cli and add labels * fix script * add ignore * fix healthscope example
59 lines
1.3 KiB
CUE
59 lines
1.3 KiB
CUE
import (
|
|
"vela/op"
|
|
)
|
|
|
|
"read-object": {
|
|
type: "workflow-step"
|
|
annotations: {}
|
|
labels: {
|
|
"ui-hidden": "true"
|
|
}
|
|
description: "Read objects for your workflow steps"
|
|
}
|
|
template: {
|
|
output: {
|
|
if parameter.apiVersion == _|_ && parameter.kind == _|_ {
|
|
op.#Read & {
|
|
value: {
|
|
apiVersion: "core.oam.dev/v1beta1"
|
|
kind: "Application"
|
|
metadata: {
|
|
name: parameter.name
|
|
if parameter.namespace != _|_ {
|
|
namespace: parameter.namespace
|
|
}
|
|
}
|
|
}
|
|
cluster: parameter.cluster
|
|
}
|
|
}
|
|
if parameter.apiVersion != _|_ || parameter.kind != _|_ {
|
|
op.#Read & {
|
|
value: {
|
|
apiVersion: parameter.apiVersion
|
|
kind: parameter.kind
|
|
metadata: {
|
|
name: parameter.name
|
|
if parameter.namespace != _|_ {
|
|
namespace: parameter.namespace
|
|
}
|
|
}
|
|
}
|
|
cluster: parameter.cluster
|
|
}
|
|
}
|
|
}
|
|
parameter: {
|
|
// +usage=Specify the apiVersion of the object, defaults to core.oam.dev/v1beta1
|
|
apiVersion?: string
|
|
// +usage=Specify the kind of the object, defaults to Application
|
|
kind?: string
|
|
// +usage=Specify the name of the object
|
|
name: string
|
|
// +usage=Specify the namespace of the object
|
|
namespace?: string
|
|
// +usage=Specify the cluster of the object
|
|
cluster: *"" | string
|
|
}
|
|
}
|