apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: recruitment-tool-emailer
  labels:
    app: recruitment-tool-emailer
spec:
  schedule: "0 8 * * *"
  jobTemplate:
    spec:
      template:
        metadata:
          name: recruitment-tool-emailer
          labels:
            app: recruitment-tool-emailer
        spec:
          containers:
          - name: recruitment-tool-emailer
            image: rekrysofta/recruitmenttool_emailer
            ports:
            - containerPort: 8877
            env:
            - name: GOOGLE_APPLICATION_CREDENTIALS
              value: /etc/gcloud-service-account/emblica-212815-8c1abce476a1.json
            - name: SITE_URL
              value: "https://rekrysofta-staging.apps.emblica.com"
            envFrom:
            - secretRef:
                name: database-staging
            - secretRef:
                name: smtp
            volumeMounts:
            - name: gcloud-service-account
              mountPath: /etc/gcloud-service-account
              readOnly: true
          volumes:
          - name: gcloud-service-account
            secret:
              secretName: gcloud-service-account
          restartPolicy: OnFailure