-
Notifications
You must be signed in to change notification settings - Fork 147
/
Copy pathtemplate.cue
84 lines (77 loc) · 1.6 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import "encoding/json"
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
metadata: {
name: "kruise-rollout"
namespace: "vela-system"
}
spec: {
components: [{
name: "kruise-rollout"
type: "helm"
properties: {
repoType: "helm"
url: "https://openkruise.github.io/charts/"
chart: "kruise-rollout"
version: "0.3.0"
upgradeCRD: parameter.upgradeCRD
values: {
replicaCount: 1
rollout: webhook: objectSelector: [{
key: "kruise-rollout.oam.dev/webhook"
operator: "Exists"
}]
}
}
}]
policies: [{
type: "topology"
name: "deploy-kruise-rollout"
properties: {
if parameter.clusters != _|_ {
clusters: parameter.clusters
}
if parameter.clusters == _|_ {
clusterLabelSelector: {}
}
}
}]
}
}
outputs: resourceTree: {
apiVersion: "v1"
kind: "ConfigMap"
metadata: {
name: "kruise-rollout-relation"
namespace: "vela-system"
labels: {
"rules.oam.dev/resources": "true"
"rules.oam.dev/resource-format": "json"
}
}
data: rules: json.Marshal(_rules)
}
_kruiseRollout: {
group: "rollouts.kruise.io"
kind: "Rollout"
}
_batchRelease: {
group: "rollouts.kruise.io"
kind: "BatchRelease"
}
_batchReleaseApiVersion: {
apiVersion: "rollouts.kruise.io/v1alpha1"
kind: "BatchRelease"
}
_deploymentApiVersion: {
apiVersion: "apps/v1"
kind: "Deployment"
}
_rules: [{
parentResourceType: _kruiseRollout
childrenResourceType: [_batchReleaseApiVersion]
}, {
parentResourceType: _batchRelease
childrenResourceType: [_deploymentApiVersion]
}]