From 417515415a601d4b77856c300ed990db495d1278 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Fri, 3 Feb 2023 15:16:32 +0200 Subject: [PATCH] conditionally add ffmpeg --- charts/nextcloud/1.6.17/questions.yaml | 6 ++++++ charts/nextcloud/1.6.17/templates/deployment.yaml | 2 ++ charts/nextcloud/1.6.17/test_values.yaml | 1 + 3 files changed, 9 insertions(+) diff --git a/charts/nextcloud/1.6.17/questions.yaml b/charts/nextcloud/1.6.17/questions.yaml index 3d23dece8a..923794df22 100644 --- a/charts/nextcloud/1.6.17/questions.yaml +++ b/charts/nextcloud/1.6.17/questions.yaml @@ -104,6 +104,12 @@ questions: type: path default: "/var/www/html/data" required: true + - variable: install_ffmpeg + label: "Install ffmpeg" + description: "Automatically Install ffmpeg when the container starts" + schema: + type: boolean + default: false - variable: cronjob description: "Setup cronjob for nextcloud" diff --git a/charts/nextcloud/1.6.17/templates/deployment.yaml b/charts/nextcloud/1.6.17/templates/deployment.yaml index 458bf08897..1450b4c63d 100644 --- a/charts/nextcloud/1.6.17/templates/deployment.yaml +++ b/charts/nextcloud/1.6.17/templates/deployment.yaml @@ -82,6 +82,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} - name: extrappvolume-{{ $index }} mountPath: {{ $hostPathConfiguration.mountPath }} {{ end }} + {{- if .Values.nextcloud.install_ffmpeg }} lifecycle: postStart: exec: @@ -94,6 +95,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} apt install -y --no-install-recommends \ ffmpeg || echo "Failed to install ffmpeg" echo "Finished." + {{- end }} {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }} volumes: - name: nginx-configuration diff --git a/charts/nextcloud/1.6.17/test_values.yaml b/charts/nextcloud/1.6.17/test_values.yaml index 3a726542c2..be1900a09d 100644 --- a/charts/nextcloud/1.6.17/test_values.yaml +++ b/charts/nextcloud/1.6.17/test_values.yaml @@ -19,6 +19,7 @@ nextcloud: host: nextcloud.kube.home password: changeme username: admin + install_ffmpeg: true nginx: image: pullPolicy: IfNotPresent