apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: flan-scan-job
  namespace: flan
spec:
   schedule: "0 0 * * 0"
   jobTemplate:
      spec:
        template:
           metadata:
             labels:
               app: flanscan
           spec:
               volumes:
               - name: shared-files
                 configMap:
                    name: shared-files
                    items:
                    - key: ips.txt
                      path: ips.txt
               restartPolicy: OnFailure
               containers:
               - name: flan-scan-svc
                 image: berndonline/flan:latest
                 imagePullPolicy: Always
                 volumeMounts:
                 - name: shared-files
                   mountPath: /shared/ips.txt
                   subPath: ips.txt
                 env:
                 - name: format
                   value: html
                 - name: clustername
                   value: <-cluster-name->
                 - name: upload
                   value: do
                 - name: bucket
                   value: <-name->
                 - name: region
                   value: <-region->
                 - name: s3url
                   value: <-s3url->
                 envFrom:
                 - secretRef:
                     name: cloud-creds
