github.com/oam-dev/kubevela@v1.9.11/pkg/stdlib/op.cue (about) 1 #GetPlacementsFromTopologyPolicies: multicluster.#GetPlacementsFromTopologyPolicies 2 3 #Deploy: multicluster.#Deploy 4 5 #ApplyApplication: #Steps & { 6 load: oam.#LoadComponetsInOrder @step(1) 7 components: #Steps & { 8 for name, c in load.value { 9 "\(name)": oam.#ApplyComponent & { 10 value: c 11 } 12 } 13 } @step(2) 14 } 15 16 // This operator will dispatch all the components in parallel when applying an application. 17 // Currently it works for Addon Observability to speed up the installation. It can also works for other applications, which 18 // needs to skip health check for components. 19 #ApplyApplicationInParallel: #Steps & { 20 load: oam.#LoadComponetsInOrder @step(1) 21 components: #Steps & { 22 for name, c in load.value { 23 "\(name)": oam.#ApplyComponent & { 24 value: c 25 waitHealthy: false 26 } 27 } 28 } @step(2) 29 } 30 31 #ApplyComponent: oam.#ApplyComponent 32 33 #RenderComponent: oam.#RenderComponent 34 35 #ApplyComponentRemaining: #Steps & { 36 // exceptions specify the resources not to apply. 37 exceptions: [...string] 38 exceptions_: {for c in exceptions {"\(c)": true}} 39 component: string 40 41 load: oam.#LoadComponets @step(1) 42 render: #Steps & { 43 rendered: oam.#RenderComponent & { 44 value: load.value[component] 45 } 46 comp: kube.#Apply & { 47 value: rendered.output 48 } 49 for name, c in rendered.outputs { 50 if exceptions_[name] == _|_ { 51 "\(name)": kube.#Apply & { 52 value: c 53 } 54 } 55 } 56 } @step(2) 57 } 58 59 #ApplyRemaining: #Steps & { 60 // exceptions specify the resources not to apply. 61 exceptions: [...string] 62 exceptions_: {for c in exceptions {"\(c)": true}} 63 64 load: oam.#LoadComponets @step(1) 65 components: #Steps & { 66 for name, c in load.value { 67 if exceptions_[name] == _|_ { 68 "\(name)": oam.#ApplyComponent & { 69 value: c 70 } 71 } 72 73 } 74 } @step(2) 75 } 76 77 #ApplyEnvBindApp: multicluster.#ApplyEnvBindApp 78 79 #DeployCloudResource: terraform.#DeployCloudResource 80 81 #ShareCloudResource: terraform.#ShareCloudResource 82 83 #LoadPolicies: oam.#LoadPolicies 84 85 #ListClusters: multicluster.#ListClusters 86 87 #MakePlacementDecisions: multicluster.#MakePlacementDecisions 88 89 #PatchApplication: multicluster.#PatchApplication 90 91 #Load: oam.#LoadComponets 92 93 #LoadInOrder: oam.#LoadComponetsInOrder