Add cnf for firewall with network of sriov
[multicloud/k8s.git] / starlingx / demo / firewall-sriov / templates / unprotected-private-net.yaml
1 apiVersion: "k8s.cni.cncf.io/v1"
2 kind: NetworkAttachmentDefinition
3 metadata:
4   name: sriov-device-{{ .Values.global.unprotectedNetName }}
5   annotations:
6     k8s.v1.cni.cncf.io/resourceName: intel.com/pci_sriov_net_{{ .Values.global.unprotectedNetProviderName }}
7 {{- if eq .Values.global.unprotectedNetProviderDriver "netdevice" }}
8 spec:
9   config: '{
10     "type": "sriov",
11     "name": "sriov-device",
12     "vlan": {{ .Values.global.unprotectedNetProviderVlan }},
13     "ipam": {
14       "type": "host-local",
15       "subnet": "{{ .Values.global.unprotectedNetCidr }}",
16       "routes": [{
17         "dst": "0.0.0.0/0"
18       }],
19       "gateway": "{{ .Values.global.unprotectedNetGwIp }}"
20     }
21   }'
22 {{- else }}
23 spec:
24   config: '{
25     "type": "sriov",
26     "name": "sriov-device",
27     "vlan": {{ .Values.global.unprotectedNetProviderVlan }}
28   }'
29 {{ end -}}