-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_apps_job.yaml
175 lines (174 loc) · 6.74 KB
/
install_apps_job.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
---
apiVersion: batch/v1
kind: Job
metadata:
name: install-nextcloud-apps
annotations:
argocd.argoproj.io/hook: PostSync
spec:
template:
spec:
securityContext:
fsGroup: 82
restartPolicy: OnFailure
volumes:
- name: nextcloud-main
persistentVolumeClaim:
claimName: nextcloud-files
- configMap:
defaultMode: 420
name: nextcloud-web-app-config
name: nextcloud-config
- configMap:
defaultMode: 420
name: nextcloud-web-app-phpconfig
name: nextcloud-phpconfig
- name: postgres-ca
secret:
defaultMode: 416
secretName: nextcloud-postgres-server-ca-key-pair
- name: postgres-client-certs
secret:
defaultMode: 416
secretName: nextcloud-postgres-nextcloud-cert
containers:
- name: nextcloud-app-installs
image: nextcloud:29-fpm-alpine
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- su -s /bin/sh www-data -c "while true; do php occ app:list && break; done; echo '\nphp occ is now available\n' && php occ app:install oidc_login --allow-unstable; php occ app:enable oidc_login --force; php occ app:install notes --allow-unstable; php occ app:install bookmarks --allow-unstable; php occ app:install deck --allow-unstable; php occ app:install side_menu --allow-unstable; php occ app:install recognize --allow-unstable; php occ app:install memories --allow-unstable; php occ app:install music --allow-unstable; echo done"
volumeMounts:
- mountPath: /var/www/
name: nextcloud-main
subPath: root
- mountPath: /var/www/html
name: nextcloud-main
subPath: html
# only needed if you have a seperate data dir for nextcloud
- mountPath: /var/www/html/data
name: nextcloud-main
subPath: data
- mountPath: /var/www/html/config
name: nextcloud-main
subPath: config
- mountPath: /var/www/html/custom_apps
name: nextcloud-main
subPath: custom_apps
- mountPath: /var/www/tmp
name: nextcloud-main
subPath: tmp
- mountPath: /var/www/html/themes
name: nextcloud-main
subPath: themes
- mountPath: /var/www/html/config/logging.config.php
name: nextcloud-config
subPath: logging.config.php
- mountPath: /var/www/html/config/oidc.config.php
name: nextcloud-config
subPath: oidc.config.php
- mountPath: /var/www/html/config/previews.config.php
name: nextcloud-config
subPath: previews.config.php
- mountPath: /var/www/html/config/proxy.config.php
name: nextcloud-config
subPath: proxy.config.php
- mountPath: /var/www/html/config/.htaccess
name: nextcloud-config
subPath: .htaccess
- mountPath: /var/www/html/config/apache-pretty-urls.config.php
name: nextcloud-config
subPath: apache-pretty-urls.config.php
- mountPath: /var/www/html/config/apcu.config.php
name: nextcloud-config
subPath: apcu.config.php
- mountPath: /var/www/html/config/apps.config.php
name: nextcloud-config
subPath: apps.config.php
- mountPath: /var/www/html/config/autoconfig.php
name: nextcloud-config
subPath: autoconfig.php
- mountPath: /var/www/html/config/smtp.config.php
name: nextcloud-config
subPath: smtp.config.php
- mountPath: /etc/secrets/ca
name: postgres-ca
- mountPath: /etc/secrets/nextcloud
name: postgres-client-certs
- mountPath: /usr/local/etc/php-fpm.d/www.conf
name: nextcloud-phpconfig
subPath: www.conf
env:
- name: POSTGRES_HOST
value: nextcloud-postgres-rw.nextcloud.svc:5432;sslmode=verify-full;sslrootcert=/etc/secrets/ca/ca.crt;sslcert=/etc/secrets/nextcloud/tls.crt;sslkey=/etc/secrets/nextcloud/tls.key
- name: POSTGRES_DB
value: nextcloud
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
key: username
name: nextcloud-pgsql-credentials
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: nextcloud-pgsql-credentials
- name: NEXTCLOUD_ADMIN_USER
valueFrom:
secretKeyRef:
key: username
name: nextcloud-admin-credentials
- name: NEXTCLOUD_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: nextcloud-admin-credentials
- name: NEXTCLOUD_DATA_DIR
value: /var/www/html/data
- name: MAIL_FROM_ADDRESS
value: user
- name: MAIL_DOMAIN
value: domain.com
- name: SMTP_SECURE
value: ssl
- name: SMTP_PORT
value: "465"
- name: SMTP_AUTHTYPE
value: LOGIN
- name: SMTP_HOST
valueFrom:
secretKeyRef:
key: smtpHost
name: nextcloud-admin-credentials
- name: SMTP_NAME
valueFrom:
secretKeyRef:
key: smtpUsername
name: nextcloud-admin-credentials
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
key: smtpPassword
name: nextcloud-admin-credentials
- name: NC_oidc_login_provider_url
valueFrom:
secretKeyRef:
key: issuer
name: nextcloud-oidc-credentials
- name: NC_oidc_login_client_id
valueFrom:
secretKeyRef:
key: client_id
name: nextcloud-oidc-credentials
- name: NC_oidc_login_client_secret
valueFrom:
secretKeyRef:
key: client_secret
name: nextcloud-oidc-credentials
- name: PGSSLCERT
value: /etc/secrets/nextcloud/tls.crt
- name: PGSSLKEY
value: /etc/secrets/nextcloud/tls.key
- name: PGSSLROOTCERT
value: /etc/secrets/ca/ca.crt