---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: {{.AdditionalNetworkName}}
  namespace: {{getOr . "AdditionalNetworkNamespace" "default"}}
spec:
  config: '{
    "cniVersion": "0.3.1",
    "type": "macvlan",
{{if (index . "Master") }}
    "master": "{{.Master}}",
{{end}}{{if (index . "Mode") }}
    "mode": "{{.Mode}}",
{{end}}{{if (index . "MTU") }}
    "mtu": {{.MTU}},
{{end}}
    "ipam": {{.IPAMConfig | indent 6}}
  }'
