48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: {{ .Release.Name }}-cron
|
|
spec:
|
|
schedule: "*/5 * * * *"
|
|
failedJobsHistoryLimit: 1
|
|
successfulJobsHistoryLimit: 0
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
securityContext:
|
|
runAsUser: 33
|
|
runAsGroup: 33
|
|
containers:
|
|
- name: nextcloud
|
|
image: {{ .Values.nextcloud.image }}
|
|
command:
|
|
- php
|
|
- -f
|
|
- cron.php
|
|
volumeMounts:
|
|
- mountPath: /var/www/html
|
|
name: html
|
|
- mountPath: /var/www/html/data
|
|
name: data
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ .Release.Name }}-nextcloud
|
|
- secretRef:
|
|
name: {{ .Release.Name }}-nextcloud
|
|
resources:
|
|
requests:
|
|
memory: "1Gi"
|
|
cpu: "1m"
|
|
limits:
|
|
memory: "4Gi"
|
|
cpu: "4"
|
|
volumes:
|
|
- name: html
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-html-iops
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-data
|
|
restartPolicy: OnFailure
|