Răsfoiți Sursa

Merge pull request #977 from truenas/NAS-119718

NAS-119718 / 23.10 / Adds lifecycle hook to install ffmpeg in NC
Stavros Kois 2 ani în urmă
părinte
comite
38cb81f54e
56 a modificat fișierele cu 128 adăugiri și 2 ștergeri
  1. 0 0
      charts/nextcloud/1.6.17/.helmignore
  2. 0 0
      charts/nextcloud/1.6.17/Chart.lock
  3. 1 1
      charts/nextcloud/1.6.17/Chart.yaml
  4. 0 0
      charts/nextcloud/1.6.17/README.md
  5. 0 0
      charts/nextcloud/1.6.17/app-readme.md
  6. 0 0
      charts/nextcloud/1.6.17/charts/common-2207.0.0.tgz
  7. 0 0
      charts/nextcloud/1.6.17/ix_values.yaml
  8. 0 0
      charts/nextcloud/1.6.17/migrations/migrate_from_1.1.0
  9. 6 0
      charts/nextcloud/1.6.17/questions.yaml
  10. 0 0
      charts/nextcloud/1.6.17/requirements.lock
  11. 0 0
      charts/nextcloud/1.6.17/templates/NOTES.txt
  12. 0 0
      charts/nextcloud/1.6.17/templates/_nginx.tpl
  13. 0 0
      charts/nextcloud/1.6.17/templates/_postgres.tpl
  14. 0 0
      charts/nextcloud/1.6.17/templates/backup-postgres-config.yaml
  15. 0 0
      charts/nextcloud/1.6.17/templates/backup-postgres-hook.yaml
  16. 0 0
      charts/nextcloud/1.6.17/templates/cronjob.yaml
  17. 56 0
      charts/nextcloud/1.6.17/templates/deployment.yaml
  18. 0 0
      charts/nextcloud/1.6.17/templates/nginx-configmap.yaml
  19. 0 0
      charts/nextcloud/1.6.17/templates/nginx-secret.yaml
  20. 0 0
      charts/nextcloud/1.6.17/templates/nuke-deployments-hook.yaml
  21. 0 0
      charts/nextcloud/1.6.17/templates/postgres-deployment.yaml
  22. 0 0
      charts/nextcloud/1.6.17/templates/postgres-secret.yaml
  23. 0 0
      charts/nextcloud/1.6.17/templates/postgres-service.yaml
  24. 0 0
      charts/nextcloud/1.6.17/templates/secrets.yaml
  25. 0 0
      charts/nextcloud/1.6.17/templates/service.yaml
  26. 0 0
      charts/nextcloud/1.6.17/templates/serviceaccount.yaml
  27. 0 0
      charts/nextcloud/1.6.17/templates/tests/deployment-check.yaml
  28. 1 0
      charts/nextcloud/1.6.17/test_values.yaml
  29. 0 0
      test/nextcloud/1.6.17/.helmignore
  30. 0 0
      test/nextcloud/1.6.17/Chart.lock
  31. 1 1
      test/nextcloud/1.6.17/Chart.yaml
  32. 0 0
      test/nextcloud/1.6.17/README.md
  33. 0 0
      test/nextcloud/1.6.17/app-readme.md
  34. 0 0
      test/nextcloud/1.6.17/charts/common-2207.0.0.tgz
  35. 0 0
      test/nextcloud/1.6.17/ix_values.yaml
  36. 0 0
      test/nextcloud/1.6.17/migrations/migrate_from_1.1.0
  37. 6 0
      test/nextcloud/1.6.17/questions.yaml
  38. 0 0
      test/nextcloud/1.6.17/requirements.lock
  39. 0 0
      test/nextcloud/1.6.17/templates/NOTES.txt
  40. 0 0
      test/nextcloud/1.6.17/templates/_nginx.tpl
  41. 0 0
      test/nextcloud/1.6.17/templates/_postgres.tpl
  42. 0 0
      test/nextcloud/1.6.17/templates/backup-postgres-config.yaml
  43. 0 0
      test/nextcloud/1.6.17/templates/backup-postgres-hook.yaml
  44. 0 0
      test/nextcloud/1.6.17/templates/cronjob.yaml
  45. 56 0
      test/nextcloud/1.6.17/templates/deployment.yaml
  46. 0 0
      test/nextcloud/1.6.17/templates/nginx-configmap.yaml
  47. 0 0
      test/nextcloud/1.6.17/templates/nginx-secret.yaml
  48. 0 0
      test/nextcloud/1.6.17/templates/nuke-deployments-hook.yaml
  49. 0 0
      test/nextcloud/1.6.17/templates/postgres-deployment.yaml
  50. 0 0
      test/nextcloud/1.6.17/templates/postgres-secret.yaml
  51. 0 0
      test/nextcloud/1.6.17/templates/postgres-service.yaml
  52. 0 0
      test/nextcloud/1.6.17/templates/secrets.yaml
  53. 0 0
      test/nextcloud/1.6.17/templates/service.yaml
  54. 0 0
      test/nextcloud/1.6.17/templates/serviceaccount.yaml
  55. 0 0
      test/nextcloud/1.6.17/templates/tests/deployment-check.yaml
  56. 1 0
      test/nextcloud/1.6.17/test_values.yaml

+ 0 - 0
charts/nextcloud/1.6.16/.helmignore → charts/nextcloud/1.6.17/.helmignore


+ 0 - 0
charts/nextcloud/1.6.16/Chart.lock → charts/nextcloud/1.6.17/Chart.lock


+ 1 - 1
charts/nextcloud/1.6.16/Chart.yaml → charts/nextcloud/1.6.17/Chart.yaml

@@ -19,4 +19,4 @@ sources:
 - https://github.com/nextcloud/docker
 - https://github.com/nextcloud/helm
 upstream_version: 2.3.2
-version: 1.6.16
+version: 1.6.17

+ 0 - 0
charts/nextcloud/1.6.16/README.md → charts/nextcloud/1.6.17/README.md


+ 0 - 0
charts/nextcloud/1.6.16/app-readme.md → charts/nextcloud/1.6.17/app-readme.md


+ 0 - 0
charts/nextcloud/1.6.16/charts/common-2207.0.0.tgz → charts/nextcloud/1.6.17/charts/common-2207.0.0.tgz


+ 0 - 0
charts/nextcloud/1.6.16/ix_values.yaml → charts/nextcloud/1.6.17/ix_values.yaml


+ 0 - 0
charts/nextcloud/1.6.16/migrations/migrate_from_1.1.0 → charts/nextcloud/1.6.17/migrations/migrate_from_1.1.0


+ 6 - 0
test/nextcloud/1.6.16/questions.yaml → 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"

+ 0 - 0
charts/nextcloud/1.6.16/requirements.lock → charts/nextcloud/1.6.17/requirements.lock


+ 0 - 0
charts/nextcloud/1.6.16/templates/NOTES.txt → charts/nextcloud/1.6.17/templates/NOTES.txt


+ 0 - 0
charts/nextcloud/1.6.16/templates/_nginx.tpl → charts/nextcloud/1.6.17/templates/_nginx.tpl


+ 0 - 0
charts/nextcloud/1.6.16/templates/_postgres.tpl → charts/nextcloud/1.6.17/templates/_postgres.tpl


+ 0 - 0
charts/nextcloud/1.6.16/templates/backup-postgres-config.yaml → charts/nextcloud/1.6.17/templates/backup-postgres-config.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/backup-postgres-hook.yaml → charts/nextcloud/1.6.17/templates/backup-postgres-hook.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/cronjob.yaml → charts/nextcloud/1.6.17/templates/cronjob.yaml


+ 56 - 0
charts/nextcloud/1.6.16/templates/deployment.yaml → charts/nextcloud/1.6.17/templates/deployment.yaml

@@ -56,6 +56,48 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
         - name: http
           containerPort: 80
           protocol: TCP
+        livenessProbe:
+          httpGet:
+            path: /status.php
+            port: http
+            httpHeaders:
+            - name: Host
+              value: localhost
+          initialDelaySeconds: 30
+          periodSeconds: 10
+          timeoutSeconds: 5
+          failureThreshold: 5
+        readinessProbe:
+          httpGet:
+            path: /status.php
+            port: http
+            httpHeaders:
+            - name: Host
+              value: localhost
+          initialDelaySeconds: 30
+          periodSeconds: 10
+          timeoutSeconds: 5
+          failureThreshold: 5
+        startupProbe:
+        {{- if .Values.nextcloud.install_ffmpeg }}
+          exec:
+            command:
+              - /bin/sh
+              - -c
+              - |
+                command -v ffmpeg /dev/null 2>&1 || exit 1
+        {{- else }}
+          httpGet:
+            path: /status.php
+            port: http
+            httpHeaders:
+            - name: Host
+              value: localhost
+        {{- end }}
+          initialDelaySeconds: 60
+          periodSeconds: 10
+          timeoutSeconds: 5
+          failureThreshold: 60
         volumeMounts:
         - name: nextcloud-data
           mountPath: /var/www/
@@ -82,6 +124,20 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
         - name: extrappvolume-{{ $index }}
           mountPath: {{ $hostPathConfiguration.mountPath }}
         {{ end }}
+        {{- if .Values.nextcloud.install_ffmpeg }}
+        lifecycle:
+          postStart:
+            exec:
+              command:
+                - /bin/sh
+                - -c
+                - |
+                  echo "Installing ffmpeg..."
+                  apt update && \
+                  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

+ 0 - 0
charts/nextcloud/1.6.16/templates/nginx-configmap.yaml → charts/nextcloud/1.6.17/templates/nginx-configmap.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/nginx-secret.yaml → charts/nextcloud/1.6.17/templates/nginx-secret.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/nuke-deployments-hook.yaml → charts/nextcloud/1.6.17/templates/nuke-deployments-hook.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/postgres-deployment.yaml → charts/nextcloud/1.6.17/templates/postgres-deployment.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/postgres-secret.yaml → charts/nextcloud/1.6.17/templates/postgres-secret.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/postgres-service.yaml → charts/nextcloud/1.6.17/templates/postgres-service.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/secrets.yaml → charts/nextcloud/1.6.17/templates/secrets.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/service.yaml → charts/nextcloud/1.6.17/templates/service.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/serviceaccount.yaml → charts/nextcloud/1.6.17/templates/serviceaccount.yaml


+ 0 - 0
charts/nextcloud/1.6.16/templates/tests/deployment-check.yaml → charts/nextcloud/1.6.17/templates/tests/deployment-check.yaml


+ 1 - 0
test/nextcloud/1.6.16/test_values.yaml → 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

+ 0 - 0
test/nextcloud/1.6.16/.helmignore → test/nextcloud/1.6.17/.helmignore


+ 0 - 0
test/nextcloud/1.6.16/Chart.lock → test/nextcloud/1.6.17/Chart.lock


+ 1 - 1
test/nextcloud/1.6.16/Chart.yaml → test/nextcloud/1.6.17/Chart.yaml

@@ -19,4 +19,4 @@ sources:
 - https://github.com/nextcloud/docker
 - https://github.com/nextcloud/helm
 upstream_version: 2.3.2
-version: 1.6.16
+version: 1.6.17

+ 0 - 0
test/nextcloud/1.6.16/README.md → test/nextcloud/1.6.17/README.md


+ 0 - 0
test/nextcloud/1.6.16/app-readme.md → test/nextcloud/1.6.17/app-readme.md


+ 0 - 0
test/nextcloud/1.6.16/charts/common-2207.0.0.tgz → test/nextcloud/1.6.17/charts/common-2207.0.0.tgz


+ 0 - 0
test/nextcloud/1.6.16/ix_values.yaml → test/nextcloud/1.6.17/ix_values.yaml


+ 0 - 0
test/nextcloud/1.6.16/migrations/migrate_from_1.1.0 → test/nextcloud/1.6.17/migrations/migrate_from_1.1.0


+ 6 - 0
charts/nextcloud/1.6.16/questions.yaml → test/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"

+ 0 - 0
test/nextcloud/1.6.16/requirements.lock → test/nextcloud/1.6.17/requirements.lock


+ 0 - 0
test/nextcloud/1.6.16/templates/NOTES.txt → test/nextcloud/1.6.17/templates/NOTES.txt


+ 0 - 0
test/nextcloud/1.6.16/templates/_nginx.tpl → test/nextcloud/1.6.17/templates/_nginx.tpl


+ 0 - 0
test/nextcloud/1.6.16/templates/_postgres.tpl → test/nextcloud/1.6.17/templates/_postgres.tpl


+ 0 - 0
test/nextcloud/1.6.16/templates/backup-postgres-config.yaml → test/nextcloud/1.6.17/templates/backup-postgres-config.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/backup-postgres-hook.yaml → test/nextcloud/1.6.17/templates/backup-postgres-hook.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/cronjob.yaml → test/nextcloud/1.6.17/templates/cronjob.yaml


+ 56 - 0
test/nextcloud/1.6.16/templates/deployment.yaml → test/nextcloud/1.6.17/templates/deployment.yaml

@@ -56,6 +56,48 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
         - name: http
           containerPort: 80
           protocol: TCP
+        livenessProbe:
+          httpGet:
+            path: /status.php
+            port: http
+            httpHeaders:
+            - name: Host
+              value: localhost
+          initialDelaySeconds: 30
+          periodSeconds: 10
+          timeoutSeconds: 5
+          failureThreshold: 5
+        readinessProbe:
+          httpGet:
+            path: /status.php
+            port: http
+            httpHeaders:
+            - name: Host
+              value: localhost
+          initialDelaySeconds: 30
+          periodSeconds: 10
+          timeoutSeconds: 5
+          failureThreshold: 5
+        startupProbe:
+        {{- if .Values.nextcloud.install_ffmpeg }}
+          exec:
+            command:
+              - /bin/sh
+              - -c
+              - |
+                command -v ffmpeg /dev/null 2>&1 || exit 1
+        {{- else }}
+          httpGet:
+            path: /status.php
+            port: http
+            httpHeaders:
+            - name: Host
+              value: localhost
+        {{- end }}
+          initialDelaySeconds: 60
+          periodSeconds: 10
+          timeoutSeconds: 5
+          failureThreshold: 60
         volumeMounts:
         - name: nextcloud-data
           mountPath: /var/www/
@@ -82,6 +124,20 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
         - name: extrappvolume-{{ $index }}
           mountPath: {{ $hostPathConfiguration.mountPath }}
         {{ end }}
+        {{- if .Values.nextcloud.install_ffmpeg }}
+        lifecycle:
+          postStart:
+            exec:
+              command:
+                - /bin/sh
+                - -c
+                - |
+                  echo "Installing ffmpeg..."
+                  apt update && \
+                  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

+ 0 - 0
test/nextcloud/1.6.16/templates/nginx-configmap.yaml → test/nextcloud/1.6.17/templates/nginx-configmap.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/nginx-secret.yaml → test/nextcloud/1.6.17/templates/nginx-secret.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/nuke-deployments-hook.yaml → test/nextcloud/1.6.17/templates/nuke-deployments-hook.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/postgres-deployment.yaml → test/nextcloud/1.6.17/templates/postgres-deployment.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/postgres-secret.yaml → test/nextcloud/1.6.17/templates/postgres-secret.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/postgres-service.yaml → test/nextcloud/1.6.17/templates/postgres-service.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/secrets.yaml → test/nextcloud/1.6.17/templates/secrets.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/service.yaml → test/nextcloud/1.6.17/templates/service.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/serviceaccount.yaml → test/nextcloud/1.6.17/templates/serviceaccount.yaml


+ 0 - 0
test/nextcloud/1.6.16/templates/tests/deployment-check.yaml → test/nextcloud/1.6.17/templates/tests/deployment-check.yaml


+ 1 - 0
charts/nextcloud/1.6.16/test_values.yaml → test/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