diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index ad09b7e8..82752f88 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -85,7 +85,7 @@ jobs: # test the helm chart with s3 as the primary storage - name: S3 Enabled as Primary Storage # we need to skip the clean up so we can test adding a file - helm_args: '--namespace nextcloud --skip-clean-up --helm-extra-set-args "--set=fullnameOverride=nextcloud --set=nextcloud.objectStore.s3.enabled=true --set=nextcloud.objectStore.s3.accessKey=nextcloud --set=nextcloud.objectStore.s3.secretKey=rootpass123 --set=nextcloud.objectStore.s3.host=minio.minio.cluster.local.svc --set=nextcloud.objectStore.s3.port=9000 --set=nextcloud.objectStore.s3.bucket=nextcloud" && echo "Success 🎉"' + helm_args: '--namespace nextcloud --skip-clean-up --helm-extra-set-args "--set=fullnameOverride=nextcloud --set=nextcloud.objectStore.s3.enabled=true --set=nextcloud.objectStore.s3.accessKey=nextcloud --set=nextcloud.objectStore.s3.secretKey=rootpass123 --set=nextcloud.objectStore.s3.host=minio.minio.cluster.local.svc --set=nextcloud.objectStore.s3.port=9000 --set=nextcloud.objectStore.s3.bucket=nextcloud --set=nextcloud.trustedDomains=*" && echo "Success 🎉"' steps: - name: Checkout @@ -143,8 +143,9 @@ jobs: # applies a kubernetes job that uploads a file and then checks log of finished pod run: | kubectl apply -f ./.github/test_upload_job.yaml --wait=true && \ - sleep 10 && \ - kubectl logs -l batch.kubernetes.io/job-name=test-file-upload + sleep 15 && \ + export POD=`kubectl get pods -o custom-columns=NAME:.metadata.name --no-headers` && \ + kubectl logs $POD summary: runs-on: ubuntu-latest-low diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 6de9269a..78c08183 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -17,6 +17,7 @@ helm install my-release nextcloud/nextcloud * [Uninstalling the Chart](#uninstalling-the-chart) * [Configuration](#configuration) * [Database Configurations](#database-configurations) + * [Object Storage as Primary Storage Configuration](#object-storage-as-primary-storage-configuration) * [Persistence Configurations](#persistence-configurations) * [Metrics Configurations](#metrics-configurations) * [Cron jobs](#cron-jobs) @@ -42,7 +43,6 @@ helm install my-release nextcloud/nextcloud * [Copy the log file to your local machine:](#copy-the-log-file-to-your-local-machine) * [Sharing the logs](#sharing-the-logs) - ## Introduction This chart bootstraps an [nextcloud](https://hub.docker.com/_/nextcloud/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. @@ -120,6 +120,7 @@ The following table lists the configurable parameters of the nextcloud chart and | `nextcloud.existingSecret.smtpHostKey` | Name of the key that contains the SMTP hostname | `nil` | | `nextcloud.update` | Trigger update if custom command is used | `0` | | `nextcloud.containerPort` | Customize container port when not running as root | `80` | +| `nextcloud.trustedDomains` | Optional space-separated list of trusted domains | `[]` | | `nextcloud.datadir` | nextcloud data dir location | `/var/www/html/data` | | `nextcloud.mail.enabled` | Whether to enable/disable email settings | `false` | | `nextcloud.mail.fromAddress` | nextcloud mail send from field | `nil` | diff --git a/charts/nextcloud/templates/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index 6f71f3f6..5bdf1cb4 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -323,6 +323,10 @@ Swift as primary object store env vars - name: OBJECTSTORE_SWIFT_CONTAINER_NAME value: {{ .Values.nextcloud.objectStore.swift.container | quote }} {{- end }}{{/* end if nextcloud.objectStore.s3.enabled */}} +{{- with .Values.nextcloud.trustedDomains }} +- name: NEXTCLOUD_TRUSTED_DOMAINS + value: {{ join " " . }} +{{- end }} {{- if .Values.nextcloud.extraEnv }} {{ toYaml .Values.nextcloud.extraEnv }} {{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 0bda337c..b2200078 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -93,6 +93,8 @@ nextcloud: datadir: /var/www/html/data persistence: subPath: + # if set, we'll template this list to the NEXTCLOUD_TRUSTED_DOMAINS env var + trustedDomains: [] ## SMTP configuration mail: enabled: false