forked from kubevela/catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.cue
63 lines (59 loc) · 1.12 KB
/
template.cue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import "encoding/json"
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
metadata: {
name: parameter.name
namespace: "vela-system"
}
spec: {
components: [
dashboard, operator,
if parameter.grafanaDashbord {
grafanaDashboardClickhouseOperator
},
]
policies: [{
type: "topology"
name: "deploy-topology"
properties: {
clusters: ["local"]
namespace: "kube-system"
}
}]
workflow: steps: [{
type: "deploy"
name: "deploy-ck"
properties: policies: ["deploy-topology"]
}]
}
}
outputs: toplogy: {
apiVersion: "v1"
kind: "ConfigMap"
metadata: {
name: parameter.name + "-toplogy"
namespace: "vela-system"
labels: {
"rules.oam.dev/resources": "true"
"rules.oam.dev/resource-format": "json"
}
}
data: rules: json.Marshal([_rule1])
}
_clickhouse: {
group: "clickhouse.altinity.com"
kind: "ClickHouseInstallation"
}
_statefulset: {
apiVersion: "apps/v1"
kind: "StatefulSet"
}
_service: {
apiVersion: "v1"
kind: "Service"
}
_rule1: {
parentResourceType: _clickhouse
childrenResourceType: [_statefulset, _service]
}