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