- New cron job in cluster - Handle presence and other concerns - Toggle in app to disable email notifications - Handles other edge cases such as cooldown period - Simple html email with simple message Closes #117
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: emailnotifierjob
|
|
spec:
|
|
schedule: "*/5 * * * *"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 3
|
|
failedJobsHistoryLimit: 3
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: emailnotifierjob
|
|
spec:
|
|
serviceAccountName: default-service-account
|
|
nodeSelector:
|
|
cloud.google.com/gke-spot: "true"
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: emailnotifierjob
|
|
image: "emailnotifierjob"
|
|
resources:
|
|
requests:
|
|
memory: "52Mi"
|
|
cpu: 50m
|
|
limits:
|
|
memory: "52Mi"
|
|
cpu: 50m
|
|
env:
|
|
- name: "GCP_PROJECT"
|
|
value: "flowy-dev-440017"
|
|
- name: "AERO_ADDR"
|
|
value: "aero:50051"
|
|
- name: "PUSHER_GRPC_ADDR"
|
|
value: "pusher:50051"
|
|
- name: "LLINK_POSTGRES_CONNECTION_URL"
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: shared-secrets
|
|
key: LLINK_POSTGRES_CONNECTION_URL
|