apiVersion: apps/v1 
kind: Deployment
metadata:
  name: free5gc-upf-deployment
  labels:
    interface: "true" 
spec:
  selector:
    matchLabels:
      app: free5gc-upf
  replicas: 1
  template:
    metadata:
      labels:
        app: free5gc-upf
    spec:
      containers:      
      - name: free5gc-upf-container
        image: free5gmano/free5gc-base
        securityContext:
          privileged: true
        command: ["/bin/sh"]
        args: ["-c", "/root/free5gc/setup-uptun.sh && sh -c /root/free5gc/free5gc-upfd"]
        volumeMounts:
          - mountPath: /dev/net/tun
            name: tun-volume
          - name: free5gc-config
            mountPath: /root/free5gc/install/etc/free5gc/free5gc.conf
            subPath: free5gc.conf
      volumes:
      - name: tun-volume
        hostPath:
          path: /dev/net/tun
      - name: free5gc-config
        configMap:
          name: free5gc-configmap
          items:
          - key: free5gc.conf
            path: free5gc.conf
