{{- range $clusterName, $cluster := .Values.clusters }} {{- if $cluster.networks }} --- apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5 kind: Metal3DataTemplate metadata: name: {{ $clusterName }}-nodepool spec: clusterName: {{ $clusterName }} networkData: links: ethernets: {{- range $name, $network := $cluster.networks }} - id: {{ $name }}_nic macAddress: fromHostInterface: {{ $network.interface }} type: phy {{- end }} networks: ipv4DHCP: {{- range $name, $network := $cluster.networks }} - id: {{ $name }} link: {{ $name }}_nic {{- end }} {{- end }} {{- end }}