57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
|
|
# services/nextcloud/maintenance-cronjob.yaml
|
||
|
|
apiVersion: batch/v1
|
||
|
|
kind: CronJob
|
||
|
|
metadata:
|
||
|
|
name: nextcloud-maintenance
|
||
|
|
namespace: nextcloud
|
||
|
|
spec:
|
||
|
|
schedule: "30 4 * * *"
|
||
|
|
concurrencyPolicy: Forbid
|
||
|
|
jobTemplate:
|
||
|
|
spec:
|
||
|
|
template:
|
||
|
|
spec:
|
||
|
|
restartPolicy: OnFailure
|
||
|
|
securityContext:
|
||
|
|
runAsUser: 0
|
||
|
|
runAsGroup: 0
|
||
|
|
containers:
|
||
|
|
- name: maintenance
|
||
|
|
image: nextcloud:29-apache
|
||
|
|
imagePullPolicy: IfNotPresent
|
||
|
|
command: ["/bin/bash", "/maintenance/maintenance.sh"]
|
||
|
|
env:
|
||
|
|
- name: NC_URL
|
||
|
|
value: https://cloud.bstein.dev
|
||
|
|
- name: ADMIN_USER
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: nextcloud-admin
|
||
|
|
key: admin-user
|
||
|
|
- name: ADMIN_PASS
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: nextcloud-admin
|
||
|
|
key: admin-password
|
||
|
|
volumeMounts:
|
||
|
|
- name: nextcloud-data
|
||
|
|
mountPath: /var/www/html
|
||
|
|
- name: maintenance-script
|
||
|
|
mountPath: /maintenance/maintenance.sh
|
||
|
|
subPath: maintenance.sh
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
cpu: 100m
|
||
|
|
memory: 256Mi
|
||
|
|
limits:
|
||
|
|
cpu: 500m
|
||
|
|
memory: 512Mi
|
||
|
|
volumes:
|
||
|
|
- name: nextcloud-data
|
||
|
|
persistentVolumeClaim:
|
||
|
|
claimName: nextcloud-data
|
||
|
|
- name: maintenance-script
|
||
|
|
configMap:
|
||
|
|
name: nextcloud-maintenance-script
|
||
|
|
defaultMode: 0755
|