Commit 8d444e4
committed
helm(cronjobs): schedule mongo backup/restore jobs on non-preemptible nodes
GKE preemptible VMs can be reclaimed by Google mid-run, causing long-running
mongo jobs (sync, backup, restore) to be killed with no error — the Job then
reports Failed because the Pod disappeared.
Adding nodeAffinity (requiredDuringScheduling, cloud.google.com/gke-preemptible
DoesNotExist) to all four mongo workloads so they are never placed on preemptible
nodes:
- cronjob/sync-mongo-production-data
- cronjob/mongo-backup
- cronjob/mongo-backup-extra
- jobs/mongo-restore
The nodeAffinity is values-driven (backup.mongo.nodeAffinity, restore.nodeAffinity,
cronJobs.syncMongoProductionData.nodeAffinity) so it can be overridden per
environment (set to {} to opt out).
Made-with: Cursor1 parent 4b37264 commit 8d444e4
4 files changed
Lines changed: 27 additions & 0 deletions
File tree
- helm-chart/sefaria
- templates
- cronjob
- jobs
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
| |||
0 commit comments