Skip to content

Commit

Permalink
add trustedDomains variable and use it for s3 tests, also increase sl…
Browse files Browse the repository at this point in the history
…eep and use templated pod name for s3 test logs

Signed-off-by: jessebot <[email protected]>
  • Loading branch information
jessebot committed Jul 24, 2024
1 parent e906a15 commit 0bf1817
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down Expand Up @@ -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` |
Expand Down
4 changes: 4 additions & 0 deletions charts/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0bf1817

Please sign in to comment.