blob: 7f731e9e427a8a98f145e4961d40b5551caa4ac3 [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: access-net
{{- if $.Values.config.upf.sriov.enabled }}
annotations:
k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.access.resourceName }}
{{- end }}
spec:
config: '{
"cniVersion": "0.3.1",
{{- if hasKey .Values.config.upf.access "vlan" }}
"vlan": {{ .Values.config.upf.access.vlan }},
{{- end }}
"type": {{ .Values.config.upf.cniPlugin | quote }},
{{- if eq .Values.config.upf.cniPlugin "macvlan" }}
"master": {{ .Values.config.upf.access.iface | quote }},
{{- end }}
{{- if eq .Values.config.upf.cniPlugin "host-device" }}
"device": {{ .Values.config.upf.access.iface | quote }},
{{- end }}
"ipam": {
"type": {{ .Values.config.upf.ipam | quote }}
},
"capabilities": { "mac": true}
}'
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: core-net
{{- if $.Values.config.upf.sriov.enabled }}
annotations:
k8s.v1.cni.cncf.io/resourceName: {{ .Values.config.upf.core.resourceName }}
{{- end }}
spec:
config: '{
"cniVersion": "0.3.1",
{{- if hasKey .Values.config.upf.core "vlan" }}
"vlan": {{ .Values.config.upf.core.vlan }},
{{- end }}
"type": {{ .Values.config.upf.cniPlugin | quote }},
{{- if eq .Values.config.upf.cniPlugin "macvlan" }}
"master": {{ .Values.config.upf.core.iface | quote }},
{{- end }}
{{- if eq .Values.config.upf.cniPlugin "host-device" }}
"device": {{ .Values.config.upf.core.iface | quote }},
{{- end }}
"ipam": {
"type": {{ .Values.config.upf.ipam | quote }}
},
"capabilities": { "mac": true}
}'