Skip to content

Commit

Permalink
Merge pull request #2631 from lsst-sqre/tickets/DM-41090
Browse files Browse the repository at this point in the history
DM-41090: Set Gafaelfawr CronJob time limits, tweak resource limits
  • Loading branch information
rra authored Oct 6, 2023
2 parents 929f865 + 6dd27ba commit 2ffa35c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions applications/gafaelfawr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Authentication and identity system
| ingress.additionalHosts | list | `[]` | Defines additional FQDNs for Gafaelfawr. This doesn't work for cookie or browser authentication, but for token-based services like git-lfs or the webdav server it does. |
| maintenance.affinity | object | `{}` | Affinity rules for Gafaelfawr maintenance and audit pods |
| maintenance.auditSchedule | string | `"30 3 * * *"` | Cron schedule string for Gafaelfawr data consistency audit (in UTC) |
| maintenance.cleanupSeconds | int | 86400 (1 day) | How long to keep old jobs around before deleting them |
| maintenance.deadlineSeconds | int | 300 (5 minutes) | How long the job is allowed to run before it will be terminated |
| maintenance.maintenanceSchedule | string | `"5 * * * *"` | Cron schedule string for Gafaelfawr periodic maintenance (in UTC) |
| maintenance.nodeSelector | object | `{}` | Node selection rules for Gafaelfawr maintenance and audit pods |
| maintenance.podAnnotations | object | `{}` | Annotations for Gafaelfawr maintenance and audit pods |
Expand Down
2 changes: 2 additions & 0 deletions applications/gafaelfawr/templates/cronjob-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
concurrencyPolicy: "Forbid"
jobTemplate:
spec:
activeDeadlineSeconds: {{ .Values.maintenance.deadlineSeconds }}
ttlSecondsAfterFinished: {{ .Values.maintenance.cleanupSeconds }}
template:
metadata:
{{- with .Values.maintenance.podAnnotations }}
Expand Down
2 changes: 2 additions & 0 deletions applications/gafaelfawr/templates/cronjob-maintenance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ spec:
concurrencyPolicy: "Forbid"
jobTemplate:
spec:
activeDeadlineSeconds: {{ .Values.maintenance.deadlineSeconds }}
ttlSecondsAfterFinished: {{ .Values.maintenance.cleanupSeconds }}
template:
metadata:
{{- with .Values.maintenance.podAnnotations }}
Expand Down
10 changes: 9 additions & 1 deletion applications/gafaelfawr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,19 @@ maintenance:
# -- Cron schedule string for Gafaelfawr periodic maintenance (in UTC)
maintenanceSchedule: "5 * * * *"

# -- How long the job is allowed to run before it will be terminated
# @default -- 300 (5 minutes)
deadlineSeconds: 300

# -- How long to keep old jobs around before deleting them
# @default -- 86400 (1 day)
cleanupSeconds: 86400

# -- Resource limits and requests for Gafaelfawr maintenance and audit pods
# @default -- See `values.yaml`
resources:
limits:
cpu: "100m"
cpu: "1"
memory: "300Mi"
requests:
cpu: "100m"
Expand Down

0 comments on commit 2ffa35c

Please sign in to comment.