apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: docker-hub-cronjobs
spec:
  schedule: "10 20 * * *"
#  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          imagePullSecrets:
            - name: gcr-secret
          containers:
          - name: curltainer
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: curltainer-hook
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
          - name: ssl-tester
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: ssl-tester-hook
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
          - name: docker-ubuntu1604-ansible-hook
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: docker-ubuntu1604-ansible-hook
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
          - name: docker-centos7-ansible-hook
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: docker-centos7-ansible-hook
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
          - name: docker-debian8-ansible-hook
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: docker-debian8-ansible-hook
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
          - name: docker-centos7-percona-toolkit
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: docker-centos7-percona-toolkit
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
          - name: docker-centos6-percona-toolkit
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: docker-centos6-percona-toolkit-hook
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
          - name: docker-fedora25-ansible
            image: gcr.io/chrisshort-net/curltainer:latest
            resources:
              requests:
                cpu: "500m"
              limits:
                cpu: "3000m"
            env:
              - name: URL
                valueFrom:
                  secretKeyRef:
                    name: docker-fedora25-ansible-hook
                    key: url
              - name: CONTTYPE
                value: "Content-Type: application/json"
              - name: DATA
                value: '{"build": true}'
