1 {{- define "machine.nodeIP" -}}
3 {{- $local := dict "first" true -}}
4 {{- range $name, $network := .networks.ipv4 -}}
5 {{- $link := $network.link | default $name -}}
6 {{- if eq $link "baremetal" -}}
7 {{- if not $local.first -}}
8 {{- $nodeIPs = printf "%s,%s" $nodeIPs (regexReplaceAll "/.*$" $network.ipAddress "") -}}
10 {{- $nodeIPs = regexReplaceAll "/.*$" $network.ipAddress "" -}}
12 {{- $_ := set $local "first" false -}}
15 {{- range $name, $network := .networks.ipv6 -}}
16 {{- $link := $network.link | default $name -}}
17 {{- if eq $link "baremetal" -}}
18 {{- if not $local.first -}}
19 {{- $nodeIPs = printf "%s,%s" $nodeIPs (regexReplaceAll "/.*$" $network.ipAddress "") -}}
21 {{- $nodeIPs = regexReplaceAll "/.*$" $network.ipAddress "" -}}
23 {{- $_ := set $local "first" false -}}
26 icn.akraino.org/node-ip: {{ $nodeIPs }}