forked from HollowMan6/Wechat-Timed-Message
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wechat-Timed-Message.yml
65 lines (63 loc) · 1.9 KB
/
Wechat-Timed-Message.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
apiVersion: v1
kind: ConfigMap
metadata:
name: wechat-timed-message-configmap
data:
delays: "30m"
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: wechat-timed-message
spec:
schedule: "0 2 21 * *" # change here for `cron`; Schedule on CST 10 during 20th day of every month.
jobTemplate:
spec:
template:
spec:
containers:
- name: wechat-timed-message
image: hollowman6/send-message-to-wechat:latest
env:
- name: DELAYS
valueFrom:
configMapKeyRef:
name: wechat-timed-message-configmap
key: delays
- name: TITLE
valueFrom:
secretKeyRef:
name: wechat-timed-message-secrets
key: title
- name: MSG
valueFrom:
secretKeyRef:
name: wechat-timed-message-secrets
key: msg
- name: SERVERCHANSCKEY
valueFrom:
secretKeyRef:
name: wechat-timed-message-secrets
key: serverchansckey
- name: OPENID
valueFrom:
secretKeyRef:
name: wechat-timed-message-secrets
key: openid
- name: PPTOKEN
valueFrom:
secretKeyRef:
name: wechat-timed-message-secrets
key: pptoken
- name: PPTOPIC
valueFrom:
secretKeyRef:
name: wechat-timed-message-secrets
key: pptopic
volumeMounts:
- mountPath: /cache
name: send-delays-marking
volumes:
- name: send-delays-marking
emptyDir: {}
restartPolicy: OnFailure