From 97b0332ac39718e0e87bdb0dd1edfc8ca2fbc0e4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 29 Jul 2021 22:17:43 +0200 Subject: [PATCH] ++nexxxxxxxtcloud --- apps/nextcloud/nginx/default.conf | 8 ------ apps/nextcloud/templates/deployment.yaml | 34 +++++++----------------- apps/nextcloud/values.yaml | 3 +++ 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/apps/nextcloud/nginx/default.conf b/apps/nextcloud/nginx/default.conf index 164de63..1e9d2e3 100644 --- a/apps/nextcloud/nginx/default.conf +++ b/apps/nextcloud/nginx/default.conf @@ -2,14 +2,6 @@ upstream php-handler { server localhost:9000; } -# server { -# listen 80; -# listen [::]:80; -# server_name _; - -# return 301 https://$server_name$request_uri; -# } - server { listen 443 ssl http2; listen [::]:443 ssl http2; diff --git a/apps/nextcloud/templates/deployment.yaml b/apps/nextcloud/templates/deployment.yaml index 0eef1d9..5e60f8d 100644 --- a/apps/nextcloud/templates/deployment.yaml +++ b/apps/nextcloud/templates/deployment.yaml @@ -60,18 +60,6 @@ spec: app: {{ .Release.Name }}-nextcloud spec: initContainers: - # - name: copy-php - # image: nextcloud:20-fpm-alpine - # command: [ "/bin/sh" ] - # env: - # - name: NEXTCLOUD_UPDATE - # value: "1" - # args: - # - -c - # - "/entrypoint.sh; rsync -a -v /var/www/html/ /var/www/nextcloud" - # volumeMounts: - # - name: nextcloud-php - # mountPath: "/var/www/nextcloud" - name: wait-for-cert image: busybox command: @@ -91,10 +79,10 @@ spec: mountPath: "/etc/nginx/conf.d/" - name: etcletsencrypt mountPath: "/etc/letsencrypt" - - name: nextcloud-php + - name: nextcloud-data mountPath: "/var/www/nextcloud" - name: nextcloud - image: nextcloud:20.0.11-apache + image: nextcloud:20.0.11-fpm ports: - containerPort: 9000 env: @@ -115,18 +103,14 @@ spec: key: POSTGRES_PASSWORD - name: POSTGRES_HOST value: {{ .Release.Name }}-postgres - - name: NEXTCLOUD_DATA_DIR - value: "/data" volumeMounts: - - name: data - mountPath: "/data" - - name: nextcloud-php - mountPath: "/var/www/nextcloud" + - name: nextcloud-data + mountPath: "/var/www/html" volumes: - name: etcletsencrypt persistentVolumeClaim: claimName: {{ tpl .Values.identifier . }}-letsencrypt-certs - - name: data + - name: nextcloud-data persistentVolumeClaim: claimName: {{ tpl .Values.identifier . }}-data - name: postgres-data @@ -135,8 +119,6 @@ spec: - name: nginx-config configMap: name: {{ tpl .Values.identifier . }}-nginx-config - - name: nextcloud-php - emptyDir: {} --- apiVersion: v1 kind: Service @@ -176,7 +158,7 @@ spec: - ReadWriteMany resources: requests: - storage: 1Gi + storage: {{ .Values.datasizeingb }}Gi storageClassName: rook-cephfs --- apiVersion: v1 @@ -188,7 +170,7 @@ spec: - ReadWriteOnce resources: requests: - storage: 500Mi + storage: {{ .Values.dbsizeingb }}Gi storageClassName: rook-ceph-block --- apiVersion: batch/v1 @@ -208,6 +190,8 @@ spec: ports: - containerPort: 80 env: + - name: ONLYGETCERT + value: "yes" - name: DOMAIN value: "{{ tpl .Values.fqdn . }}" - name: EMAIL diff --git a/apps/nextcloud/values.yaml b/apps/nextcloud/values.yaml index aef81ae..ec0ee0a 100644 --- a/apps/nextcloud/values.yaml +++ b/apps/nextcloud/values.yaml @@ -6,3 +6,6 @@ letsencryptStaging: "yes" # persistent thing identifier: "{{ .Release.Name }}" fqdn: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" + +datasizeingb: 1 +dbsizeingb: 0.5