cleanup; readme; workflow_dispatch does not yet work in gitea, but trigger can be changed for pseudo-manual triggers
All checks were successful
Build container images / build (push) Successful in 58s
All checks were successful
Build container images / build (push) Successful in 58s
This commit is contained in:
40
readme.md
40
readme.md
@@ -2,3 +2,43 @@
|
||||
# `rotate-backups` in a container image
|
||||
|
||||
<https://rotate-backups.readthedocs.io>
|
||||
|
||||
## Example usage in kubernetes cronjob
|
||||
|
||||
```yaml
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: mariadb-backup-rotate-cron
|
||||
namespace: mariadb
|
||||
labels:
|
||||
app: mariadb-backup-rotate-cron
|
||||
spec:
|
||||
schedule: "0 4 20 * *" # 20th of each month at 4am
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mariadb-backup-rotate-cron
|
||||
spec:
|
||||
containers:
|
||||
- name: mariadb-backup-rotate-container
|
||||
image: gitea.jbrumond.me/images/rotate-backups:8
|
||||
command: [ "/opt/rotate.sh", "--daily=7", "--weekly=4", "--monthly=12", "--yearly=always" ]
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
volumeMounts:
|
||||
- name: mariadb-backup-persistent-storage
|
||||
mountPath: /data
|
||||
restartPolicy: OnFailure
|
||||
volumes:
|
||||
- name: mariadb-backup-persistent-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: mariadb-backup-pv-claim
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user