blob: 46165e7ef04fa2b3ba6fb34513c604db37c6c8f4 [file] [log] [blame]
apiVersion: batch/v1beta1
kind: CronJob
metadata:
labels:
app: sheriff-emails
name: sheriff-emails
spec:
schedule: "0 13 * * 5"
jobTemplate:
metadata:
labels:
app: sheriff-emails
spec:
template:
spec:
restartPolicy: Never
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: sheriff-emails
image: gcr.io/skia-public/sheriff_emails:2018-10-04T17_32_58Z-rmistry-d8a33ad-clean
args:
- "--logtostderr"
- "--email_client_secret_file=/etc/sheriff-email-secrets/client_secret.json"
- "--email_token_cache_file=/etc/sheriff-email-secrets/client_token.json"
ports:
- containerPort: 20000
- containerPort: 8000
volumeMounts:
- name: sheriff-email-secrets
mountPath: /etc/sheriff-email-secrets
- name: skia-sheriff-emails-sa
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "10Mi"
cpu: "10m"
volumes:
- name: sheriff-email-secrets
secret:
secretName: sheriff-email-secrets
- name: skia-public-auth
secret:
secretName: skia-public-auth
- name: skia-sheriff-emails-sa
secret:
secretName: skia-sheriff-emails
- name: skia-org-legacy-login-secrets
secret:
secretName: skia-org-legacy-login-secrets