Skip to content

Commit fd7d888

Browse files
committed
feat(helm): add configurable job history limits for heartbeat cronjob
Problem The heartbeat CronJob had successfulJobsHistoryLimit hardcoded to 0 and failedJobsHistoryLimit was not set at all. This prevented users from retaining job history for debugging and monitoring purposes. Solution Add successfulJobsHistoryLimit and failedJobsHistoryLimit as configurable values under the heartbeat section in values.yaml. The template now uses these values with sensible defaults (0 for successful, 1 for failed). Validation - Verified the Helm template renders correctly with default values - Verified custom values can be passed via --set heartbeat.successfulJobsHistoryLimit=X Signed-off-by: mfeix <marcel.feix@exxcellent.de>
1 parent 2534d7d commit fd7d888

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

charts/linkerd-control-plane/templates/heartbeat.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ spec:
2424
{{ else -}}
2525
schedule: "{{ dateInZone "04 15 * * *" (now | mustDateModify "+10m") "UTC"}}"
2626
{{ end -}}
27-
successfulJobsHistoryLimit: 0
27+
successfulJobsHistoryLimit: {{ .Values.heartbeat.successfulJobsHistoryLimit | default 0 }}
28+
failedJobsHistoryLimit: {{ .Values.heartbeat.failedJobsHistoryLimit | default 1 }}
2829
jobTemplate:
2930
spec:
3031
template:

charts/linkerd-control-plane/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@ identity:
509509
disableHeartBeat: false
510510
# -- Config for the heartbeat cronjob
511511
# heartbeatSchedule: "0 0 * * *"
512+
heartbeat:
513+
# -- Number of successful job runs to retain
514+
successfulJobsHistoryLimit: 0
515+
# -- Number of failed job runs to retain
516+
failedJobsHistoryLimit: 1
512517

513518
# proxy injector configuration
514519
proxyInjector:

0 commit comments

Comments
 (0)