pudelkoM | 3f0efb1 | 2021-01-12 13:55:48 -0800 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 5 | */}} |
| 6 | |
| 7 | apiVersion: "k8s.cni.cncf.io/v1" |
| 8 | kind: NetworkAttachmentDefinition |
| 9 | metadata: |
| 10 | name: {{ .Values.multusNetworkName }} |
| 11 | annotations: |
| 12 | k8s.v1.cni.cncf.io/resourceName: intel.com/{{ .Values.sriovResourceName }} |
| 13 | spec: |
| 14 | config: '{ |
| 15 | "type": "sriov", |
| 16 | "name": "sriov-network", |
Hyunsun Moon | 4c29f1d | 2021-05-21 10:27:15 -0700 | [diff] [blame] | 17 | {{- if hasKey .Values.network "vlan" }} |
| 18 | "vlan": {{ .Values.network.vlan }}, |
| 19 | {{- end }} |
pudelkoM | 3f0efb1 | 2021-01-12 13:55:48 -0800 | [diff] [blame] | 20 | "ipam": { |
Hung-Wei Chiu | 9de579b | 2021-02-03 12:39:22 -0800 | [diff] [blame] | 21 | {{- if eq .Values.network.ipam "host-local" }} |
pudelkoM | 3f0efb1 | 2021-01-12 13:55:48 -0800 | [diff] [blame] | 22 | "type": "host-local", |
Hung-Wei Chiu | 9de579b | 2021-02-03 12:39:22 -0800 | [diff] [blame] | 23 | "subnet": "{{ .Values.network.static.subnets }}", |
pudelkoM | 3f0efb1 | 2021-01-12 13:55:48 -0800 | [diff] [blame] | 24 | "routes": [{ |
| 25 | "dst": "0.0.0.0/0" |
| 26 | }], |
Hung-Wei Chiu | 9de579b | 2021-02-03 12:39:22 -0800 | [diff] [blame] | 27 | "gateway": "{{ .Values.network.static.gateway }}" |
| 28 | {{- else if eq .Values.network.ipam "dhcp" }} |
| 29 | "type": "dhcp" |
| 30 | |
| 31 | {{- end }} |
pudelkoM | 3f0efb1 | 2021-01-12 13:55:48 -0800 | [diff] [blame] | 32 | } |
Hyunsun Moon | 4c29f1d | 2021-05-21 10:27:15 -0700 | [diff] [blame] | 33 | }' |