networkslice: Added free5gc helm charts.
[icn.git] / demo / networkslice / free5gc / helm / f5gc-pcf / templates / deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata:
4   name: f5gc-pcf
5   labels:
6     app: f5gc-pcf
7   annotations:
8     free5gc.org/nssi-id: '27394d25-dbf5-428e-8fc3-f5b2add67115'
9     free5gc.org/nsi-ids: '[
10         { "id": "4e6db941-47d6-4fce-9c71-f7eb35a75d03" },
11     ]'
12 spec:
13   replicas: 1
14   selector:
15     matchLabels:
16       app: f5gc-pcf
17   strategy:
18     type: Recreate
19   template:
20     metadata:
21       labels:
22         app: f5gc-pcf
23     spec:
24       securityContext:
25         runAsUser: 0
26         runAsGroup: 0
27       nodeSelector:
28 {{ .Values.nodeSelector | toYaml | indent 8 }}
29       initContainers:
30       - name: init-myservice
31         image: busybox:1.31.1
32         command: ['sh', '-c', "until wget -qO- $nrfUri &> /dev/null; do echo waiting for $nrfUri; sleep 2; done"]
33         env:
34         - name: nrfUri
35           value: {{ .Values.configuration.nrfUri }}
36       containers:
37         - name: free5g-304-pcf 
38           image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
39           imagePullPolicy: {{ .Values.image.pullPolicy }}
40           command: ["./pcf"]
41           args:
42             - -pcfcfg
43             - ../config/pcfcfg.conf
44           securityContext:
45             privileged: false
46           volumeMounts:
47             - name: f5gc-pcf-config
48               mountPath: /free5gc/config
49             - name: f5gc-pcf-cert
50               mountPath: /free5gc/support/TLS
51           ports:
52             - containerPort: {{ .Values.service.port }}
53               name: f5gc-pcf
54               protocol: TCP
55         - name: tcpdump
56           image: corfr/tcpdump
57           imagePullPolicy: IfNotPresent
58           command:
59             - /bin/sleep
60             - infinity
61       dnsPolicy: ClusterFirst
62       restartPolicy: Always
63       schedulerName: default-scheduler
64       serviceAccountName: f5gc-pcf-sa
65       terminationGracePeriodSeconds: 30
66       volumes:
67         - name: f5gc-pcf-cert
68           secret:
69             secretName: f5gc-pcf-tls-secret
70         - name: f5gc-pcf-config
71           configMap:
72             name: f5gc-pcf-config