Merge "skip generating etherenet_mac_address when null"
This commit is contained in:
commit
d78f3e5c11
@ -18,10 +18,16 @@ metadata:
|
|||||||
image: localhost/templater
|
image: localhost/templater
|
||||||
values:
|
values:
|
||||||
hosts:
|
hosts:
|
||||||
- macAddress: 00:aa:bb:cc:dd
|
- macAddresses:
|
||||||
|
oam: 00:aa:bb:cc:dd
|
||||||
|
pxe: 00:aa:bb:cc:ee
|
||||||
name: node-1
|
name: node-1
|
||||||
- macAddress: 00:aa:bb:cc:ee
|
- macAddresses:
|
||||||
|
oam: 00:aa:bb:cc:ff
|
||||||
name: node-2
|
name: node-2
|
||||||
|
- macAddresses:
|
||||||
|
pxe: 00:aa:bb:cc:22
|
||||||
|
name: node-3
|
||||||
template: |
|
template: |
|
||||||
{{ range .hosts -}}
|
{{ range .hosts -}}
|
||||||
---
|
---
|
||||||
@ -30,5 +36,7 @@ template: |
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ .name }}
|
name: {{ .name }}
|
||||||
spec:
|
spec:
|
||||||
bootMACAddress: {{ .macAddress }}
|
{{- if and (.macAddresses) (.macAddresses.oam) }}
|
||||||
|
bootMACAddress: {{ .macAddresses.oam }}
|
||||||
|
{{- end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -92,7 +92,7 @@ template: |
|
|||||||
{{- range $envAll.commonNetworking.links }}
|
{{- range $envAll.commonNetworking.links }}
|
||||||
-
|
-
|
||||||
{{ toYaml . | indent 6 }}
|
{{ toYaml . | indent 6 }}
|
||||||
{{- if $host.macAddresses }}
|
{{- if and ($host.macAddresses) (index $host.macAddresses .id) }}
|
||||||
ethernet_mac_address: {{ index $host.macAddresses .id }}
|
ethernet_mac_address: {{ index $host.macAddresses .id }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user