kind: CronJob
apiVersion: batch/v1
metadata:
  name: vxug-collector
spec:
  schedule: "40 0 * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          volumes:
            - name: malware-mount
              persistentVolumeClaim:
                claimName: vxug-pvc
          containers:
            - name: vxug-collector
              image: gclef/vxug:1.16
              imagePullPolicy: "IfNotPresent"
              resources:
                limits:
                  memory: "6Gi"
                requests:
                  memory: "4Gi"
              volumeMounts:
                - name: malware-mount
                  mountPath: /RAID
              env:
                - name: CLEANUP
                  value: "False"
                - name: VXUG_PATH
                  valueFrom:
                    secretKeyRef:
                      name: malware-collection-secrets
                      key: VXUG_PATH
                - name: ES_PASSWORD
                  valueFrom:
                    secretKeyRef:
                      name: malware-collection-secrets
                      key: ES_PASSWORD
                - name: ES_HOST
                  valueFrom:
                    secretKeyRef:
                      name: malware-collection-secrets
                      key: ES_HOST
                - name: ES_USERNAME
                  valueFrom:
                    secretKeyRef:
                      name: malware-collection-secrets
                      key: ES_USERNAME
          imagePullSecrets:
            - name: registrycreds