forked from jceb/docker-sogo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cronjob-every-minute.yaml
35 lines (35 loc) · 1.02 KB
/
cronjob-every-minute.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
apiVersion: batch/v1
kind: CronJob
metadata:
name: sogo-every-minute
spec:
schedule: "* * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: sogo
image: salvoxia/sogo
command:
- sh
args:
- -c
# Run Session expiry and Email Alarms jobs as user 'sogo' after starting up the daemon
- /start.sh && su sogo -c '/usr/local/sbin/sogo-tool expire-sessions 60 && /usr/local/sbin/sogo-ealarms-notify'
env:
- name: DISABLE_CRON
value: "1"
ports:
- containerPort: 80
name: http
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /srv/etc
name: config
volumes:
- name: config
configMap:
name: sogo-config
restartPolicy: Never