forked from HariSekhon/Kubernetes-configs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cronjob-fix-stale.patch.yaml
32 lines (27 loc) · 1012 Bytes
/
cronjob-fix-stale.patch.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
#
# Author: Hari Sekhon
# Date: 2020-09-07 16:14:55 +0100 (Mon, 07 Sep 2020)
#
# vim:ts=2:sts=2:sw=2:et
# lint: k8s
#
# https://github.com/HariSekhon/Kubernetes-configs
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn
# and optionally send me feedback to help improve or steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# C r o n j o b S t a l e P a t c h
# ============================================================================ #
# https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#cron-job-limitations
# workaround to fix stale cronjobs and get them running again after they miss the magic number of 100 executions
# apply like this:
#
# kubectl patch cj <name> --patch "$(cat k8s_cronjob_fix_stale.patch.yaml)"
---
spec:
startingDeadlineSeconds: 200