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
/
Copy pathnextcloud-db-task.yaml
76 lines (76 loc) · 2.11 KB
/
nextcloud-db-task.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
apiVersion: v1
kind: Template
metadata:
name: nextcloud-db-task
parameters:
- name: NEXTCLOUD_IMAGE
description: Image to deploy
value: docker.io/nextcloud
- name: NEXTCLOUD_IMAGE_TAG
description: Tag of the Nextcloud Docker Image to deploy
value: 16-fpm
- name: DB_TASK
description: Task to be performed
value: "add-missing-indices"
objects:
- apiVersion: batch/v1
kind: Job
metadata:
generateName: nextcloud-db-task-${DB_TASK}-
spec:
concurrencyPolicy: Replace
activeDeadlineSeconds: 3600
template:
metadata:
generateName: nextcloud-db-task-${DB_TASK}-
spec:
nodeSelector:
appclass: main
containers:
- name: nextcloud-db-task-${DB_TASK}
image: nextcloud:${NEXTCLOUD_IMAGE_TAG}
imagePullPolicy: Always
args:
- /var/www/html/occ
- db:${DB_TASK}
env:
- name: NEXTCLOUD_UPDATE
value: "1"
- name: NC_dbhost
value: mariadb
- name: NC_dbuser
valueFrom:
secretKeyRef:
key: database-user
name: mariadb
- name: NC_dbpassword
valueFrom:
secretKeyRef:
key: database-password
name: mariadb
- name: NC_dbname
value: nextcloud
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