Newer
Older
{{/* Change the user and group to www-data as required by occ */}}
{{- define "nextcloud-onlyoffice.securityContext" }}
fsGroup: 33
runAsUser: 33
runAsGroup: 33
{{- end}}
{{/* Add volume mounts that are also used by the nextcloud container */}}
{{/* and the configMap that contains job specific content */}}
{{- define "nextcloud-onlyoffice.volumeMounts" }}
- name: nextcloud-data
- name: nextcloud-data
mountPath: /var/www/html
subPath: html
- name: nextcloud-data
mountPath: /var/www/html/data
subPath: data
- name: nextcloud-data
mountPath: /var/www/html/config
subPath: config
- name: nextcloud-data
mountPath: /var/www/html/custom_apps
subPath: custom_apps
- name: nextcloud-data
mountPath: /var/www/html/themes
subPath: themes
- name: nextcloud-data
mountPath: /var/www/tmp
subPath: tmp
mountPath: /var/local
{{- end }}
{{/* Set environment variables that are needed for the nextcloud setup */}}
{{- define "nextcloud-onlyoffice.env" }}
{{- if .Values.nextcloud.internalDatabase.enabled }}
- name: SQLITE_DATABASE
value: {{ .Values.nextcloud.internalDatabase.name | quote }}
{{- else if .Values.nextcloud.mariadb.enabled }}
- name: MYSQL_HOST
value: {{ template "mariadb.primary.fullname" .Subcharts.nextcloud.Subcharts.mariadb }}
value: {{ .Values.nextcloud.mariadb.auth.database | quote }}
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
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" .Release.Name "db" }}
key: db-username
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" .Release.Name "db" }}
key: db-password
{{- else }}
- name: MYSQL_HOST
value: {{ .Values.nextcloud.externalDatabase.host | quote }}
- name: MYSQL_DATABASE
value: {{ .Values.nextcloud.externalDatabase.database | quote }}
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" .Release.Name "db" }}
key: db-username
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" .Release.Name "db" }}
key: db-password
{{- end }}
- name: NEXTCLOUD_ADMIN_USER
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" .Release.Name "nextcloud" }}
key: nextcloud-username
- name: NEXTCLOUD_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" .Release.Name "nextcloud" }}
key: nextcloud-password
- name: NEXTCLOUD_TRUSTED_DOMAINS
value: {{ .Values.nextcloud.nextcloud.host }}
{{- end }}
{{/* Add volumes that correspond to the volume mounts used in this tpl */}}
{{- define "nextcloud-onlyoffice.volumes" }}
- name: nextcloud-data
{{- if .Values.nextcloud.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.nextcloud.persistence.existingClaim }}{{ .Values.nextcloud.persistence.existingClaim }}{{- else }}{{ template "nextcloud.fullname" .Subcharts.nextcloud }}-nextcloud{{- end }}
name: {{ .Release.Name }}-nextcloud-onlyoffice-config