apiVersion: batch/v1
kind: Job
metadata:
  name: falco-event-generator
spec:
  template:
    spec:
      serviceAccount: falco-event-generator
      containers:
      - name: event-generator
        image: falcosecurity/event-generator
        imagePullPolicy: Always
        command: ["/bin/event-generator", "run"]
        env:
        - name: FALCO_EVENT_GENERATOR_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
      restartPolicy: Never
  backoffLimit: 4
