networkslice: Added free5gc helm charts.
[icn.git] / demo / networkslice / free5gc / helm / f5gc-smf / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: {{ template "fullname" . }}
5   labels:
6     app: f5gc-smf
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     free5gc.org/supported-snssais: '[
14         { "st": 1,
15           "ssd": "010203",
16         },
17         { "st": 1,
18           "ssd": "112233",
19         },
20     ]'
21 spec:
22   #serviceName: "f5gc-smf"
23   replicas: 1
24   selector:
25     matchLabels:
26       app: f5gc-smf
27   strategy:
28     type: Recreate
29   template:
30     metadata:
31       labels:
32         app: f5gc-smf
33         baseAppp: {{ .Values.baseApp }}
34       #annotations:
35       #  k8s.v1.cni.cncf.io/networks: '[{
36       #      "name": "ovn-networkobj",
37       #      "namespace": "default",
38       #      "interface": "net4"
39       #    }]'
40           #k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [{ "name": "ovn-pfcp-net", "interface": "net1", "defaultGateway": "false" }]}'
41     spec:
42       securityContext:
43         runAsUser: 0
44         runAsGroup: 0
45       nodeSelector:
46 {{ .Values.nodeSelector | toYaml | indent 8 }}
47       hostname: {{ .Values.hostname }}
48       subdomain: {{ .Values.subdomain }}
49       initContainers:
50       - name: init-myservice1
51         image: busybox:1.31.1
52         command: ['sh', '-c', "until wget -qO- $nrfUri &> /dev/null; do echo waiting for $nrfUri; sleep 2; done"]
53         env:
54         - name: nrfUri
55           value: {{ .Values.configuration.nrfUri }}
56       - name: init-myservice2
57         image: busybox:1.31.1
58         command: ['sh', '-c', "until ping -q -c 2 $UPFIP &> /dev/null; do echo waiting for upf: $UPFIP; sleep 2; done"]
59         env:
60         - name: UPFIP
61           value: {{ .Values.userplane_information.up_nodes.UPF.node_id }}
62       containers:
63         - name: free5g-304-smf 
64           image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
65           imagePullPolicy: {{ .Values.image.pullPolicy }}
66           command: ["./smf"]
67           args:
68             - -smfcfg
69             - ../config/smfcfg.conf
70             - -uerouting
71             - ../config/uerouting.yaml
72           securityContext:
73             privileged: false
74           volumeMounts:
75             - name: f5gc-smf-config
76               mountPath: /free5gc/config
77             - name: f5gc-smf-cert
78               mountPath: /free5gc/support/TLS
79           ports:
80             - containerPort: {{ .Values.service.port }}
81               name: if-sbi
82               protocol: TCP
83             - containerPort: 8805
84               name: if-n4
85               protocol: UDP
86         - name: tcpdump
87           image: corfr/tcpdump
88           imagePullPolicy: IfNotPresent
89           command:
90             - /bin/sleep
91             - infinity
92       dnsPolicy: ClusterFirst
93       restartPolicy: Always
94       schedulerName: default-scheduler
95       serviceAccountName: f5gc-smf-sa
96       terminationGracePeriodSeconds: 30
97       volumes:
98         - name: f5gc-smf-cert
99           secret:
100             secretName: f5gc-smf-tls-secret
101         - name: f5gc-smf-config
102           configMap:
103             name: f5gc-smf-config