blob: 856345dafeb66c142181f8362b78dcb3cc790880 [file] [log] [blame]
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -07001---
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 Chen0f12b9c2019-04-18 11:12:59 -070017---
18apiVersion: "k8s.cni.cncf.io/v1"
19kind: NetworkAttachmentDefinition
20metadata:
Hyunsun Moon159d1f72019-07-24 02:12:28 -060021 name: s1u-net
Hyunsun Moona24d3f92019-06-19 03:04:58 -050022{{- if $.Values.network.sriov.enabled }}
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -070023 annotations:
Woojoong Kime455aab2019-07-12 10:53:43 -070024 k8s.v1.cni.cncf.io/resourceName: intel.com/sriov_vfio
Hyunsun Moona24d3f92019-06-19 03:04:58 -050025{{- end }}
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -070026spec:
27 config: '{
Hyunsun Moon159d1f72019-07-24 02:12:28 -060028 "type": {{ .Values.network.s1u.cni_plugin | quote }},
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -070029 "ipam": {
Hyunsun Moon159d1f72019-07-24 02:12:28 -060030 "type": {{ .Values.network.s1u.ipam | quote }},
31 {{- if eq .Values.network.s1u.ipam "host-local" }}
32 "subnet": {{ .Values.network.s1u.subnet | quote }},
33 "gateway": {{ .Values.network.s1u.gateway | quote }}
34 {{- else if eq .Values.network.s1u.ipam "centralip" }}
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -070035 "ipType": "cluster",
Hyunsun Moon159d1f72019-07-24 02:12:28 -060036 "network": {{ .Values.network.s1u.subnet | quote }},
37 "etcdURL": {{ .Values.global.etcdurl | quote }}
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -070038 {{- end }}
39 }
Hyunsun Moona24d3f92019-06-19 03:04:58 -050040 }'
Hyunsun Moon159d1f72019-07-24 02:12:28 -060041---
42apiVersion: "k8s.cni.cncf.io/v1"
43kind: NetworkAttachmentDefinition
44metadata:
45 name: sgi-net
46{{- if $.Values.network.sriov.enabled }}
47 annotations:
48 k8s.v1.cni.cncf.io/resourceName: intel.com/sriov_vfio
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -070049{{- end }}
Hyunsun Moon159d1f72019-07-24 02:12:28 -060050spec:
51 config: '{
52 "type": {{ .Values.network.sgi.cni_plugin | quote }},
53 "ipam": {
54 "type": {{ .Values.network.sgi.ipam | quote }},
55 {{- if eq .Values.network.sgi.ipam "host-local" }}
56 "subnet": {{ .Values.network.sgi.subnet | quote }},
57 "gateway": {{ .Values.network.sgi.gateway | quote }}
58 {{- else if eq .Values.network.sgi.ipam "centralip" }}
59 "ipType": "cluster",
60 "network": {{ .Values.network.sgi.subnet | quote }},
61 "etcdURL": {{ .Values.global.etcdurl | quote }}
62 {{- end }}
63 }
64 }'