@@ -8,6 +8,53 @@ metadata:
8
8
labels :
9
9
{{ include "cardano-node.labels" . | nindent 4 }}
10
10
data :
11
- topology.json : |-
12
- {{ toJson .Values.topology.config | indent 4 }}
11
+ topology.json : |
12
+ {
13
+ "bootstrapPeers": [{{- range $i, $peer := .Values.topology.bootstrapPeers }}
14
+ {{- if $i }},{{ end }}
15
+ { "address": "{{ $peer.address }}", "port": {{ $peer.port }} }
16
+ {{- end }}],
17
+ "localRoots": [
18
+ {{- range $i, $local := .Values.topology.localRoots }}
19
+ {{- if $i }},{{ end }}
20
+ {
21
+ "accessPoints": [
22
+ {{- range $j, $peer := $local.accessPoints }}
23
+ {{- if $j }},{{ end }}
24
+ { "address": "{{ $peer.address }}", "port": {{ $peer.port }}, "name": "{{ $peer.name }}" }
25
+ {{- end }}
26
+ ],
27
+ "advertise": {{ $local.advertise | toJson }},
28
+ "trustable": {{ $local.trustable | default false | toJson }},
29
+ "valency": {{ $local.valency }}
30
+ }
31
+ {{- end }}
32
+ ]
33
+ {{- with .Values.topology.peerSnapshotFile }},
34
+ "peerSnapshotFile": "{{ . }}"
35
+ {{- end }},
36
+ "publicRoots": [{{- $hasPublicRoots := false }}
37
+ {{- range $public := .Values.topology.publicRoots }}
38
+ {{- if and (hasKey $public "accessPoints") (gt (len $public.accessPoints) 0) }}
39
+ {{- $hasPublicRoots = true }}
40
+ {{- end }}
41
+ {{- end }}
42
+ {{- if $hasPublicRoots }}
43
+ {{- range $i, $public := .Values.topology.publicRoots }}
44
+ {{- if and (hasKey $public "accessPoints") (gt (len $public.accessPoints) 0) }}
45
+ {{- if $i }},{{ end }}
46
+ {
47
+ "accessPoints": [
48
+ {{- range $j, $peer := $public.accessPoints }}
49
+ {{- if $j }},{{ end }}
50
+ { "address": "{{ $peer.address }}", "port": {{ $peer.port }}, "name": "{{ $peer.name }}" }
51
+ {{- end }}
52
+ ],
53
+ "advertise": {{ $public.advertise | default false | toJson }}
54
+ }
55
+ {{- end }}
56
+ {{- end }}
57
+ {{- end }}],
58
+ "useLedgerAfterSlot": {{ .Values.topology.useLedgerAfterSlot | int }}
59
+ }
13
60
{{- end }}
0 commit comments