Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | Copyright 2018-present Open Networking Foundation |
| 3 | Copyright 2018 Intel Corporation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | */}} |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 17 | |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 18 | --- |
| 19 | apiVersion: "k8s.cni.cncf.io/v1" |
| 20 | kind: NetworkAttachmentDefinition |
| 21 | metadata: |
Hyunsun Moon | 159d1f7 | 2019-07-24 02:12:28 -0600 | [diff] [blame] | 22 | name: s1u-net |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame^] | 23 | {{- if $.Values.config.sriov.enabled }} |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 24 | annotations: |
Woojoong Kim | e455aab | 2019-07-12 10:53:43 -0700 | [diff] [blame] | 25 | k8s.v1.cni.cncf.io/resourceName: intel.com/sriov_vfio |
Hyunsun Moon | a24d3f9 | 2019-06-19 03:04:58 -0500 | [diff] [blame] | 26 | {{- end }} |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 27 | spec: |
| 28 | config: '{ |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 29 | "type": {{ .Values.networks.cniPlugin | quote }}, |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 30 | "ipam": { |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 31 | "type": {{ .Values.networks.ipam | quote }}, |
| 32 | {{- if eq .Values.networks.ipam "host-local" }} |
| 33 | "subnet": {{ .Values.networks.s1u.subnet | quote }}, |
| 34 | "gateway": {{ .Values.networks.s1u.gateway | quote }} |
| 35 | {{- else if eq .Values.networks.ipam "centralip" }} |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 36 | "ipType": "cluster", |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 37 | "network": {{ .Values.networks.s1u.subnet | quote }}, |
| 38 | "etcdURL": {{ .Values.networks.etcdurl | quote }} |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 39 | {{- end }} |
| 40 | } |
Hyunsun Moon | a24d3f9 | 2019-06-19 03:04:58 -0500 | [diff] [blame] | 41 | }' |
Hyunsun Moon | 159d1f7 | 2019-07-24 02:12:28 -0600 | [diff] [blame] | 42 | --- |
| 43 | apiVersion: "k8s.cni.cncf.io/v1" |
| 44 | kind: NetworkAttachmentDefinition |
| 45 | metadata: |
| 46 | name: sgi-net |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame^] | 47 | {{- if $.Values.config.sriov.enabled }} |
Hyunsun Moon | 159d1f7 | 2019-07-24 02:12:28 -0600 | [diff] [blame] | 48 | annotations: |
| 49 | k8s.v1.cni.cncf.io/resourceName: intel.com/sriov_vfio |
Wei-Yu Chen | 0f12b9c | 2019-04-18 11:12:59 -0700 | [diff] [blame] | 50 | {{- end }} |
Hyunsun Moon | 159d1f7 | 2019-07-24 02:12:28 -0600 | [diff] [blame] | 51 | spec: |
| 52 | config: '{ |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 53 | "type": {{ .Values.networks.cniPlugin | quote }}, |
Hyunsun Moon | 159d1f7 | 2019-07-24 02:12:28 -0600 | [diff] [blame] | 54 | "ipam": { |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 55 | "type": {{ .Values.networks.ipam | quote }}, |
| 56 | {{- if eq .Values.networks.ipam "host-local" }} |
| 57 | "subnet": {{ .Values.networks.sgi.subnet | quote }}, |
| 58 | "gateway": {{ .Values.networks.sgi.gateway | quote }} |
| 59 | {{- else if eq .Values.networks.ipam "centralip" }} |
Hyunsun Moon | 159d1f7 | 2019-07-24 02:12:28 -0600 | [diff] [blame] | 60 | "ipType": "cluster", |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 61 | "network": {{ .Values.networks.sgi.subnet | quote }}, |
| 62 | "etcdURL": {{ .Values.networks.etcdurl | quote }} |
Hyunsun Moon | 159d1f7 | 2019-07-24 02:12:28 -0600 | [diff] [blame] | 63 | {{- end }} |
| 64 | } |
| 65 | }' |