-
Notifications
You must be signed in to change notification settings - Fork 2
/
stalledRetry.yaml
59 lines (59 loc) · 1.85 KB
/
stalledRetry.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
50
51
52
53
54
55
56
57
58
59
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: retry-stalled-objects
spec:
schedule: "*/10 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 0
failedJobsHistoryLimit: 3
jobTemplate:
spec:
backoffLimit: 1
template:
spec:
restartPolicy: OnFailure
containers:
- name: utils
image: zenko/s3utils:0.2
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args:
- -c
- node stalled.js
env:
- name: ENDPOINT
value: ""
- name: ACCESS_KEY
value: ""
- name: SECRET_KEY
value: ""
- name: MONGODB_REPLICASET
value: ""
- name: MONGODB_DATABASE
value: "metadata"
- name: DRY_RUN
value: "false"
- name: EXPIRED_BY_HOUR
value: "1"
# limits the number of retry resources per retry request
- name: REQUEST_BATCH_SIZE
value: "10"
# limits the number of retry resource entries in queue
- name: QUEUE_LIMIT
value: "1000"
# limits the number of parallel retry requests
- name: CONCURRENT_REQUESTS
value: "5"
- name: ENABLE_HEAP_PROFILER
value: "1"
- name: HEAP_PROFILER_INTERVAL_MS
value: "600000"
# path to write heap snapshots
- name: HEAP_PROFILER_PATH
value: "/path/to/write"
# https://www.mongodb.com/docs/v4.2/core/read-preference/index.html
# mongodb read preference - primary|secondary|primaryPreferred|secondaryPreferred|nearest
- name: MONGODB_READ_PREFERENCE
value: "secondaryPreferred"