kind: CronJob
apiVersion: batch/v1
metadata:
  name: androidmalwaregithub-collector
spec:
  schedule: "0 0 * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          volumes:
            - name: malware-mount
              persistentVolumeClaim:
                claimName: android-malware-pvc
          containers:
            - name: android-malware-collector
              image: gclef/androidmalwaregithub:1.3
              imagePullPolicy: "IfNotPresent"
              env:
                - 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
                - name: GITHUB_ANDROID_PATH
                  value: "/RAID/github-android-malware/"
              volumeMounts:
                - name: malware-mount
                  mountPath: /RAID
                  readOnly: false
          imagePullSecrets:
            - name: registrycreds