mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-21 05:26:52 +00:00
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
apiVersion: core.oam.dev/v1beta1
|
|
kind: WorkflowStepDefinition
|
|
metadata:
|
|
name: apply-component
|
|
spec:
|
|
schematic:
|
|
cue:
|
|
template: |
|
|
import ("vela/op")
|
|
parameter: {
|
|
component: string
|
|
prefixIP?: string
|
|
}
|
|
|
|
// apply workload to kubernetes cluster
|
|
apply: op.#ApplyComponent & {
|
|
component: parameter.component
|
|
}
|
|
|
|
// wait until workload.status equal "Running"
|
|
wait: op.#ConditionalWait & {
|
|
continue: apply.status.phase =="Running"
|
|
}
|
|
|
|
// export podIP
|
|
myIP: apply.status.podIP
|
|
---
|
|
apiVersion: core.oam.dev/v1beta1
|
|
kind: WorkflowStepDefinition
|
|
metadata:
|
|
name: apply-remaining
|
|
spec:
|
|
schematic:
|
|
cue:
|
|
template: |
|
|
import ("vela/op")
|
|
parameter: {
|
|
exceptions?: [componentName=string]: {
|
|
// skipApplyWorkload indicates whether to skip apply the workload resource
|
|
skipApplyWorkload: *true | bool
|
|
|
|
// skipAllTraits indicates to skip apply all resources of the traits.
|
|
// If this is true, skipApplyTraits will be ignored
|
|
skipAllTraits: *true| bool
|
|
|
|
// skipApplyTraits specifies the names of the traits to skip apply
|
|
skipApplyTraits: [...string]
|
|
}
|
|
}
|
|
|
|
apply: op.#ApplyRemaining & {
|
|
parameter
|
|
}
|
|
|