apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
  labels:
    app: myapp
spec:
  containers:
  - name: myapp-container
    image: busybox
    command: ['sh', '-c', 'echo The app is running! && sleep 3600']
  initContainers:
  - name: init-network-client
    image: sdnvortex/network-controller:v0.4.9
    command: ["/go/bin/client"]
    args: ["-s=unix:///tmp/vortex.sock", "-b=br100", "-n=eth100", "-i=192.168.24.50/24"]
    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
  restartPolicy: Never
  volumes:
  - name: grpc-sock
    hostPath:
      path: /tmp/vortex/
