mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-08-18 03:36:26 +00:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: rollup-weekly
|
|
spec:
|
|
# Runs every 30 minutes for 2 minutes
|
|
schedule: "*/30 * * * *"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 1
|
|
jobTemplate:
|
|
spec:
|
|
# Cleanup after 1 day
|
|
ttlSecondsAfterFinished: 86400
|
|
backoffLimit: 3
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: rollup-weekly
|
|
app.kubernetes.io/part-of: database
|
|
spec:
|
|
serviceAccountName: database
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: healthcheck
|
|
image: ghcr.io/stefanprodan/podinfo:6.14.1
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- /bin/sh
|
|
- /scripts/rollup.sh
|
|
env:
|
|
- name: ROLLUP_STEPS
|
|
value: "12"
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 32Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 16Mi
|
|
volumeMounts:
|
|
- name: scripts
|
|
mountPath: /scripts
|
|
volumes:
|
|
- name: scripts
|
|
configMap:
|
|
name: rollup-script
|
|
defaultMode: 0755
|