apiVersion: apps/v1 
kind: Deployment
metadata:
  name: free5gc-test-deployment
spec:
  selector:
    matchLabels:
      app: free5gc-test
  replicas: 1
  template:
    metadata:
      labels:
        app: free5gc-test
    spec:
      containers:      
      - name: myapp-container
        image: j13tw/free5gc-test:stage3.0.4
        securityContext:
          privileged: true
        imagePullPolicy: IfNotPresent
        command: ["/bin/sh"]
        args: ["-c", "ip addr add 60.60.0.1 dev lo && ip link set dev lo up && sleep 3650d"]
      initContainers:
      - name: init-network-client
        image: sdnvortex/network-controller:v0.4.9
        command: ["/go/bin/client"]
        args: ["-s=unix:///tmp/vortex.sock", "-b=br0", "-n=eth1", "-i=192.168.2.210/23"]
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: POD_UUID
          valueFrom:
            fieldRef:
              fieldPath: metadata.uid
        volumeMounts:
        - mountPath: /tmp/
          name: grpc-sock
      volumes:
      - name: grpc-sock
        hostPath:
          path: /tmp/vortex/
