badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | --- |
| 8 | apiVersion: "k8s.cni.cncf.io/v1" |
| 9 | kind: NetworkAttachmentDefinition |
| 10 | metadata: |
Hyunsun Moon | 2b21eb4 | 2022-03-24 01:52:22 -0600 | [diff] [blame^] | 11 | name: gnb-net |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 12 | {{- if $.Values.config.gnbsim.sriov.enabled }} |
| 13 | annotations: |
Hyunsun Moon | 2b21eb4 | 2022-03-24 01:52:22 -0600 | [diff] [blame^] | 14 | k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.gnbsim.sriov.resourceName }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 15 | {{- end }} |
| 16 | spec: |
| 17 | config: '{ |
| 18 | {{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion }} |
| 19 | "cniVersion": "0.3.1", |
| 20 | {{- end }} |
| 21 | "type": {{ .Values.config.gnbsim.cniPlugin | quote }}, |
Hyunsun Moon | 2b21eb4 | 2022-03-24 01:52:22 -0600 | [diff] [blame^] | 22 | {{- if eq .Values.config.gnbsim.cniPlugin "macvlan" }} |
| 23 | "master": {{ .Values.config.gnbsim.iface | quote }}, |
| 24 | {{- end }} |
| 25 | {{- if eq .Values.config.gnbsim.cniPlugin "host-device" }} |
| 26 | "device": {{ .Values.config.gnbsim.iface | quote }}, |
| 27 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 28 | "ipam": { |
| 29 | "type": {{ .Values.config.gnbsim.ipam | quote }} |
| 30 | } |
| 31 | }' |
| 32 | --- |