mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-24 10:13:01 +00:00
* Feat: ref component Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: support topology and override Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: add support for external policy and workflow Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: add admission control Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: disable cross namespace ref object Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Chore: refactor Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: support labelSelector in ref-objects Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: add pre approve for deploy step Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Chore: refactor Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: test Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: support comp/trait type in override policy even not used by prototype Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: support regex match for patch component name Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: labelSelector not work for cluster Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: ref workflow contains external policy Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: revision test Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: parallel apply components Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: add test for oam provider Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: service ref-comp & indirect trait ns Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: align namespace setting for chart Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add strict unmarshal and reformat Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: merge with cluster rework Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: patch trait-def Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: apply components + load dynamic component Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add test for loadPoliciesInOrder Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: add test for open merge Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: reformat & add test for step generator Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add test for parse override policy related defs Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add test for multicluster provider (expandTopology and overrideConfiguration) Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add admission test Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: revert trait status pass in component status Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add test for dependency in workflowstep & standalone multicluster test Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add check for ref and steps in WorkflowStep & enhance ref-objects scheme check Signed-off-by: Somefive <yd219913@alibaba-inc.com>
54 lines
1.3 KiB
CUE
54 lines
1.3 KiB
CUE
import (
|
|
"vela/op"
|
|
)
|
|
|
|
"deploy": {
|
|
type: "workflow-step"
|
|
annotations: {}
|
|
labels: {}
|
|
description: "Deploy components with policies."
|
|
}
|
|
template: {
|
|
deploy: op.#Steps & {
|
|
load: op.#Load @step(1)
|
|
_components: [ for k, v in load.value {v}]
|
|
loadPoliciesInOrder: op.#LoadPoliciesInOrder & {
|
|
if parameter.policies != _|_ {
|
|
input: parameter.policies
|
|
}
|
|
} @step(2)
|
|
_policies: loadPoliciesInOrder.output
|
|
handleDeployPolicies: op.#HandleDeployPolicies & {
|
|
inputs: {
|
|
components: _components
|
|
policies: _policies
|
|
}
|
|
} @step(3)
|
|
_decisions: handleDeployPolicies.outputs.decisions
|
|
_patchedComponents: handleDeployPolicies.outputs.components
|
|
deploy: op.#ApplyComponents & {
|
|
parallelism: parameter.parallelism
|
|
components: {
|
|
for decision in _decisions {
|
|
for key, comp in _patchedComponents {
|
|
"\(decision.cluster)-\(decision.namespace)-\(key)": {
|
|
value: comp
|
|
if decision.cluster != _|_ {
|
|
cluster: decision.cluster
|
|
}
|
|
if decision.namespace != _|_ {
|
|
namespace: decision.namespace
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} @step(4)
|
|
}
|
|
parameter: {
|
|
auto: *true | bool
|
|
policies?: [...string]
|
|
parallelism: *5 | int
|
|
}
|
|
}
|