This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
forked from tobru/nextcloud-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextcloud-cron.yaml
97 lines (97 loc) · 3.17 KB
/
nextcloud-cron.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
apiVersion: v1
kind: Template
metadata:
name: nextcloud
annotations:
description: "Nextcloud - A safe home for all your data"
tags: "fileshare,nextcloud"
iconClass: fa-cloud-upload
template.openshift.io/provider-display-name: "jngrb"
template.openshift.io/documentation-url: "https://github.com/jngrb/nextcloud-openshift/blob/master/README.md"
template.openshift.io/support-url: "https://github.com/jngrb/nextcloud-openshift/issues"
parameters:
- name: NEXTCLOUD_IMAGE_NAME
description: Name of the Nextcloud Docker image to deploy
value: nextcloud
- name: NEXTCLOUD_IMAGESTREAM_NAME
description: Name of the image stream for the nextcloud deployment
value: nextcloud
- name: NEXTCLOUD_IMAGE_TAG
description: Tag of the Nextcloud Docker image to deploy
value: 18.0.4-fpm
- name: MYSQL_HOST
description: Host of the mysql/mariadb service
value: mariadb.nextcloud.svc
- name: REDIS_HOST
description: Host of the redis service
value: redis.nextcloud.svc
objects:
- apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: nextcloud-cron
spec:
concurrencyPolicy: Forbid
jobTemplate:
spec:
activeDeadlineSeconds: 7200
template:
spec:
containers:
- args:
- php
- -f
- /var/www/html/cron.php
env:
- name: NEXTCLOUD_UPDATE
value: "1"
- name: MYSQL_USER
valueFrom:
secretKeyRef:
key: database-user
name: mariadb
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: mariadb
- name: MYSQL_DATABASE
value: nextcloud
- name: MYSQL_HOST
value: ${MYSQL_HOST}
- name: REDIS_HOST
value: ${REDIS_HOST}
- name: REDIS_HOST_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: redis
image: ${NEXTCLOUD_IMAGESTREAM_NAME}:${NEXTCLOUD_IMAGE_TAG}
imagePullPolicy: Always
name: nextcloud-cron
resources: {}
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /var/www/html
name: nextcloud-source
- mountPath: /var/www/html/data
name: nextcloud-data
subPath: data
- mountPath: /var/www/html/config
name: nextcloud-data
subPath: config
- mountPath: /var/www/html/custom_apps
name: nextcloud-data
subPath: apps
dnsPolicy: ClusterFirst
restartPolicy: Never
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
name: nextcloud-source
- name: nextcloud-data
persistentVolumeClaim:
claimName: nextcloud-data
schedule: '*/5 * * * *'
suspend: false