nad.yaml 800 B

1234567891011121314151617181920212223242526272829
  1. {{- if .Values.multus }}
  2. apiVersion: "k8s.cni.cncf.io/v1"
  3. kind: NetworkAttachmentDefinition
  4. metadata:
  5. name: {{ .Release.Name }}-net
  6. spec:
  7. {{- with .Values.multus }}
  8. config: '{
  9. "cniVersion": "0.3.1",
  10. "type": "macvlan",
  11. "master": "{{ .masterIface }}",
  12. "mode": "bridge",
  13. "ipam": {
  14. "type": "static",
  15. "addresses": [ {
  16. "address": "{{ .internalIP }}",
  17. "gateway": "{{ .internalGW }}"
  18. }{{- if .externalIP }},
  19. {
  20. "address":"{{ .externalIP }}"
  21. }{{- end }}
  22. ],
  23. "routes": [
  24. { "dst": "0.0.0.0/0" }
  25. ]
  26. }
  27. }'
  28. {{- end }}
  29. {{- end }}