-
Notifications
You must be signed in to change notification settings - Fork 29
/
db-not-responding-cronjob.yaml
49 lines (49 loc) · 1.3 KB
/
db-not-responding-cronjob.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
apiVersion: batch/v1
kind: CronJob
metadata:
name: enable-db-not-responding
spec:
schedule: "00 20 * * *"
jobTemplate:
spec:
ttlSecondsAfterFinished: 60
template:
spec:
containers:
- name: enable-db-not-responding
image: curlimages/curl
imagePullPolicy: IfNotPresent
args:
- "http://feature-flag-service:8080/v1/flags/db_not_responding"
- "-X"
- "PUT"
- "-H"
- "Content-Type: application/json"
- "-d"
- '{"enabled": true}'
restartPolicy: OnFailure
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: disable-db-not-responding
spec:
schedule: "25 20 * * *"
jobTemplate:
spec:
ttlSecondsAfterFinished: 60
template:
spec:
containers:
- name: disable-db-not-responding
image: curlimages/curl
imagePullPolicy: IfNotPresent
args:
- "http://feature-flag-service:8080/v1/flags/db_not_responding"
- "-X"
- "PUT"
- "-H"
- "Content-Type: application/json"
- "-d"
- '{"enabled": false}'
restartPolicy: OnFailure