---
apiVersion: "apps/v1"
kind: Deployment
metadata:
  name: eventsrunner-k8s-sensor
  namespace: eventsrunner
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eventsrunner-k8s-sensor
  template:
    metadata:
      labels:
        app: eventsrunner-k8s-sensor
    spec:
      serviceAccountName: eventsrunner-service-account
      containers:
        - name: eventsrunner-k8s-sensor
          image: "luqmanmohammed/eventsrunner-k8s-sensor"
          args: ["-v4"]
          volumeMounts:
            - name: eventsrunner-k8s-sensor-config
              mountPath: /etc/eventsrunner-k8s-sensor
          env:
            - name: ER_K8S_SENSORNAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: ER_K8S_SENSORNAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
      volumes:
        - name: eventsrunner-k8s-sensor-config
          configMap:
            name: eventsrunner-k8s-sensor-config
          