networkslice: Added free5gc helm charts.
[icn.git] / demo / networkslice / free5gc / helm / f5gc-amf / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: {{ template "fullname" . }}
5   labels:
6     app: f5gc-amf
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   replicas: 1
23   selector:
24     matchLabels:
25       app: f5gc-amf
26   strategy:
27     type: Recreate
28   template:
29     metadata:
30       labels:
31         app: f5gc-amf
32 {{- if eq .Values.helmInstallOvn false }}
33       annotations:
34         k8s.v1.cni.cncf.io/networks: '[{
35             "name": "ovn-networkobj",
36             "namespace": "default"
37           }]'
38         k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [{ "name": "sctpnetwork", "interface": "n1n2" }]}'
39 {{- end }}
40     spec:
41       securityContext:
42         runAsUser: 0
43         runAsGroup: 0
44       nodeSelector:
45 {{ .Values.nodeSelector | toYaml | indent 8 }}
46       initContainers:
47       - name: init-myservice
48         image: busybox:1.31.1
49         command: ['sh', '-c', "until wget -qO- $nrfUri &> /dev/null; do echo waiting for $nrfUri; sleep 2; done"]
50         env:
51         - name: nrfUri
52           value: {{ .Values.configuration.nrfUri }}
53       containers:
54         - name: free5g-304-amf 
55           image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
56           imagePullPolicy: {{ .Values.image.pullPolicy }}
57           command: ["./amf"]
58           args:
59             - -amfcfg
60             - ../config/amfcfg.conf
61           securityContext:
62             privileged: false
63           volumeMounts:
64             - name: f5gc-amf-config
65               mountPath: /free5gc/config
66             - name: f5gc-amf-cert
67               mountPath: /free5gc/support/TLS
68           ports:
69             - containerPort: {{ .Values.service.port }}
70               name: f5gc-amf
71               protocol: TCP
72         - name: tcpdump
73           image: corfr/tcpdump
74           imagePullPolicy: IfNotPresent
75           command:
76             - /bin/sleep
77             - infinity
78       dnsPolicy: ClusterFirst
79       restartPolicy: Always
80       schedulerName: default-scheduler
81       serviceAccountName: f5gc-amf-sa
82       terminationGracePeriodSeconds: 30
83       volumes:
84         - name: f5gc-amf-cert
85           secret:
86             secretName: f5gc-amf-tls-secret
87         - name: f5gc-amf-config
88           configMap:
89             name: f5gc-amf-config