blob: 90f9d20c6c262615b37ccc23fa2ef3c2db0f03ee [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004 # SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7---
8apiVersion: "k8s.cni.cncf.io/v1"
9kind: NetworkAttachmentDefinition
10metadata:
Hyunsun Moon2b21eb42022-03-24 01:52:22 -060011 name: gnb-net
badhri854c028b32021-11-03 18:24:05 -050012{{- if $.Values.config.gnbsim.sriov.enabled }}
13 annotations:
Hyunsun Moon2b21eb42022-03-24 01:52:22 -060014 k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.gnbsim.sriov.resourceName }}
badhri854c028b32021-11-03 18:24:05 -050015{{- end }}
16spec:
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 Moon2b21eb42022-03-24 01:52:22 -060022 {{- 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 }}
badhri854c028b32021-11-03 18:24:05 -050028 "ipam": {
29 "type": {{ .Values.config.gnbsim.ipam | quote }}
30 }
31 }'
32---