From abeede7359972aed8447edcb3ae768afd3db7b49 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Fri, 7 May 2021 06:13:39 +0500 Subject: [PATCH] Allow specifying extra volumes for nextcloud --- test/nextcloud/1.2.2/questions.yaml | 25 +++++++++++++++++++ .../nextcloud/1.2.2/templates/deployment.yaml | 9 +++++++ 2 files changed, 34 insertions(+) diff --git a/test/nextcloud/1.2.2/questions.yaml b/test/nextcloud/1.2.2/questions.yaml index 497b55490d..ffc8d36a72 100644 --- a/test/nextcloud/1.2.2/questions.yaml +++ b/test/nextcloud/1.2.2/questions.yaml @@ -134,6 +134,31 @@ questions: type: hostpath required: true + - variable: extraAppVolumeMounts + label: "Nextcloud Extra Host Path Volumes" + group: "Storage" + schema: + type: list + items: + - variable: extraAppVolume + label: "Nextcloud Host Path Volume" + description: "Add an extra host path volume for nextcloud application" + schema: + type: dict + attrs: + - variable: mountPath + label: "Mount Path in Pod" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: hostPath + label: "Host Path" + description: "Host path" + schema: + type: hostpath + required: true + - variable: postgresAppVolumeMounts label: "Postgres Storage" group: "Storage" diff --git a/test/nextcloud/1.2.2/templates/deployment.yaml b/test/nextcloud/1.2.2/templates/deployment.yaml index ba954a825c..db653eac29 100644 --- a/test/nextcloud/1.2.2/templates/deployment.yaml +++ b/test/nextcloud/1.2.2/templates/deployment.yaml @@ -48,7 +48,16 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} - name: nextcloud-data mountPath: /var/www/html/themes subPath: "themes" + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} {{ include "common.storage.allAppVolumes" .Values | nindent 6 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} # Will mount configuration files as www-data (id: 33) for nextcloud securityContext: fsGroup: 33