# The sensor-controller listens for changes on the sensor CRD and creates sensor executor jobs
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sensor-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sensor-controller
  template:
    metadata:
      labels:
        app: sensor-controller
    spec:
      serviceAccountName: argo-events-sa
      containers:
      - name: sensor-controller
        image: argoproj/sensor-controller:v0.11
        imagePullPolicy: Always
        env:
          - name: SENSOR_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: SENSOR_CONFIG_MAP
            value: sensor-controller-configmap
