2 apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
3 kind: Metal3DataTemplate
5 name: {{ .Values.clusterName }}-nodepool
7 clusterName: {{ .Values.clusterName }}
9 {{- if .Values.networkData }}
10 ipAddressesFromIPPool:
11 {{- range $name, $network := .Values.networkData.networks.ipv4 }}
12 {{- $link := $network.link | default $name }}
13 {{- if eq $link "baremetal" }}
14 - key: node_ip_{{ $name }}
15 name: {{ $.Values.clusterName }}-{{ $network.fromIPPool }}
18 {{- range $name, $network := .Values.networkData.networks.ipv6 }}
19 {{- $link := $network.link | default $name }}
20 {{- if eq $link "baremetal" }}
21 - key: node_ip_{{ $name }}
22 name: {{ $.Values.clusterName }}-{{ $network.fromIPPool }}
29 annotation: icn.akraino.org/node-ip
31 {{- if .Values.networkData }}
35 {{- range $name, $link := .Values.networkData.links.ethernets }}
38 fromHostInterface: {{ $link.interface }}
42 {{- if .Values.networkData.networks.ipv4DHCP }}
44 {{- range $name, $network := .Values.networkData.networks.ipv4DHCP }}
46 link: {{ $network.link | default $name }}_nic
49 {{- if .Values.networkData.networks.ipv4 }}
51 {{- range $name, $network := .Values.networkData.networks.ipv4 }}
53 link: {{ $network.link | default $name }}_nic
54 ipAddressFromIPPool: {{ $.Values.clusterName }}-{{ $network.fromIPPool }}
55 {{- $pool := (get $.Values.ipPools $network.fromIPPool) }}
56 {{- if hasKey $pool "gateway" }}
61 fromIPPool: {{ $.Values.clusterName }}-{{ $network.fromIPPool }}
65 {{- if .Values.networkData.networks.ipv6DHCP }}
67 {{- range $name, $network := .Values.networkData.networks.ipv6DHCP }}
69 link: {{ $network.link | default $name }}_nic
72 {{- if .Values.networkData.networks.ipv6 }}
74 {{- range $name, $network := .Values.networkData.networks.ipv6 }}
76 link: {{ $network.link | default $name }}_nic
77 ipAddressFromIPPool: {{ $.Values.clusterName }}-{{ $network.fromIPPool }}
78 {{- $pool := (get $.Values.ipPools $network.fromIPPool) }}
79 {{- if hasKey $pool "gateway" }}
84 fromIPPool: {{ $.Values.clusterName }}-{{ $network.fromIPPool }}
89 Using routes[0].servers.dnsFromIPPool above doesn't have the desired
90 effect. So use separate services field here
92 {{- if .Values.networkData.services }}
93 {{- if .Values.networkData.services.dns }}
96 {{- range $address := .Values.networkData.services.dns }}