networkslice: Added free5gc helm charts.
[icn.git] / demo / networkslice / free5gc / helm / f5gc-upf / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: {{ template "fullname" . }}
5   labels:
6     app: f5gc-upf
7     sliceidx: 6d3d79da-f781-4cd9-813a-dbdad01e01c0
8   annotations:
9     free5gc.org/nssi-id: '27394d25-dbf5-428e-8fc3-f5b2add67115'
10     free5gc.org/nsi-ids: '[
11         { "id": "4e6db941-47d6-4fce-9c71-f7eb35a75d03" },
12     ]'
13 spec:
14   #serviceName: "f5gc-upf"
15   replicas: 1
16   selector:
17     matchLabels:
18       app: f5gc-upf
19   strategy:
20     type: Recreate
21   template:
22     metadata:
23       labels:
24         app: f5gc-upf
25         baseApp: {{.Values.baseApp}}
26 {{- if eq .Values.helmInstallOvn false }}
27       annotations:
28         k8s.v1.cni.cncf.io/networks: '[{
29             "name": "ovn-networkobj",
30             "namespace": "default"
31           }]'
32         k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [{ "name": "gtpunetwork", "interface": "n3" }]}'
33 {{- end }}
34     spec:
35       securityContext:
36         runAsUser: 0
37         runAsGroup: 0
38       nodeSelector:
39 {{ .Values.nodeSelector | toYaml | indent 8 }}
40       hostname: {{.Values.hostname}}
41       subdomain: {{.Values.subdomain}}
42       containers:
43         - name: free5g-304-upf 
44           image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
45           imagePullPolicy: {{ .Values.image.pullPolicy }}
46           command: ["./free5gc-upfd"]
47           args:
48             - -f
49             - ../config/upfcfg.yaml
50           securityContext:
51             privileged: false
52             capabilities:
53               add: ["NET_ADMIN", "NET_RAW", "NET_BIND_SERVICE", "SYS_TIME"]
54           volumeMounts:
55             - name: f5gc-upf-config
56               mountPath: /free5gc/config
57             - mountPath: /dev/net/tun
58               name: tun-devdir
59           ports:
60             - containerPort: 2152
61               name: if-n3
62               protocol: UDP
63             - containerPort: 8805
64               name: if-n4
65               protocol: UDP
66         - name: tcpdump
67           image: corfr/tcpdump
68           imagePullPolicy: IfNotPresent
69           command:
70             - /bin/sleep
71             - infinity
72       dnsPolicy: ClusterFirst
73       restartPolicy: Always
74       schedulerName: default-scheduler
75       serviceAccountName: f5gc-upf-sa
76       terminationGracePeriodSeconds: 30
77       volumes:
78         - name: f5gc-upf-config
79           configMap:
80             name: f5gc-upf-config
81         - name: tun-devdir
82           hostPath:
83             path: /dev/net/tun