mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-23 17:53:04 +00:00
* Feat: add the feature that views in addon are applied independently.(#3905) separate the deployment of views in addon and deploy them separately instead of nested in application. see the issue for details Refs #3905 Signed-off-by: HanMengnan <1448189829@qq.com> * Fix: add test case of readViewFile. Signed-off-by: HanMengnan <1448189829@qq.com> * Fix: add the apply method of yaml view. Signed-off-by: HanMengnan <1448189829@qq.com> * Fix: add addon suit-test case Signed-off-by: HanMengnan <1448189829@qq.com>
38 lines
766 B
YAML
38 lines
766 B
YAML
apiVersion: "v1"
|
|
kind: "ConfigMap"
|
|
metadata:
|
|
name: "cloud-resource-view"
|
|
namespace: "vela-system"
|
|
data:
|
|
template: |
|
|
import (
|
|
"vela/ql"
|
|
)
|
|
|
|
parameter: {
|
|
appName: string
|
|
appNs: string
|
|
}
|
|
resources: ql.#ListResourcesInApp & {
|
|
app: {
|
|
name: parameter.appName
|
|
namespace: parameter.appNs
|
|
filter: {
|
|
"apiVersion": "terraform.core.oam.dev/v1beta1"
|
|
"kind": "Configuration"
|
|
}
|
|
withStatus: true
|
|
}
|
|
}
|
|
status: {
|
|
if resources.err == _|_ {
|
|
"cloud-resources": [ for i, resource in resources.list {
|
|
resource.object
|
|
}]
|
|
}
|
|
if resources.err != _|_ {
|
|
error: resources.err
|
|
}
|
|
}
|
|
|