-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cue
50 lines (43 loc) · 1.08 KB
/
test.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
import "list"
#AlwaysStrictDns: {
clusters: [
...{
type: "strict_dns"
...
}
]
...
}
#AlwaysCorrectAddress: {
clusters: [...{
name: string
let _n = name
load_assignment: {
cluster_name: _n
endpoints: [
{
lb_endpoints: [
{
endpoint: address: socket_address: {
address: _n
port_value: 8080
}
}
]
}
]
}
...
}]
...
}
#AllClustersArePresent: {
let _names = ["user-service", "frontend-users", "api-service", "monolith"]
clusters: [for n in _names {name: or(_names), ...}]
_clusterNames: list.SortStrings([for c in clusters {c.name}])
_clusterNames: list.SortStrings(_names)
...
}
static_resources: #AlwaysStrictDns
static_resources: #AlwaysCorrectAddress
static_resources: #AllClustersArePresent