apiVersion: apps/v1
kind: Deployment
metadata:
  name: vr-controller
  namespace: virtualrouter
  labels:
    app: controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: controller
  template:
    metadata:
      namespace: virtualrouter
      labels:
        app: controller
    spec:
      serviceAccount: virtualrouter-controller-sa
      containers:
      - name: controller
        image: tmaxcloudck/virtualrouter-controller:v0.1.2
        imagePullPolicy: Always
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace