From 291e7988d8bdb1f383ece481c3aa0fe98bf44108 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:45:48 +0100 Subject: [PATCH 01/11] chore(deps): bump helm/kind-action from 1.10.0 to 1.11.0 (#670) Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/helm/kind-action/releases) - [Commits](https://github.com/helm/kind-action/compare/v1.10.0...v1.11.0) --- updated-dependencies: - dependency-name: helm/kind-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: GreyXor --- .github/workflows/lint-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 0a8f01b3..4d136168 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -117,7 +117,7 @@ jobs: fi - name: Create kind cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.11.0 if: steps.list-changed.outputs.changed == 'true' - name: Install MinIO for testing S3 as Primary Storage From f551737156ac78f0a27fe26dac2cac8278d39532 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Sat, 17 Aug 2024 02:36:27 +0200 Subject: [PATCH 02/11] feat(nextcloud): Add support of imaginary an externalPreviewProvider Signed-off-by: WrenIX Signed-off-by: GreyXor --- .github/workflows/lint-test.yaml | 4 + charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/README.md | 45 ++++++++++ .../defaultConfigs/imaginary.config.php.tpl | 4 + .../templates/imaginary/deployment.yaml | 88 +++++++++++++++++++ .../templates/imaginary/service.yaml | 36 ++++++++ charts/nextcloud/test-values/imaginary.yaml | 14 +++ charts/nextcloud/values.yaml | 67 ++++++++++++++ 8 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl create mode 100644 charts/nextcloud/templates/imaginary/deployment.yaml create mode 100644 charts/nextcloud/templates/imaginary/service.yaml create mode 100644 charts/nextcloud/test-values/imaginary.yaml diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 4d136168..fd32a2ff 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -89,6 +89,10 @@ jobs: helm_args: | --namespace nextcloud --skip-clean-up --helm-extra-set-args "--values charts/nextcloud/test-values/s3-as-primary-storage.yaml" + # test the helm chart with imaginary + - name: Imaginary Enabled + helm_args: --helm-extra-set-args "--values charts/nextcloud/test-values/imaginary.yaml" + steps: - name: Checkout uses: actions/checkout@v4 diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 6e7d78bb..8b3b58cc 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 6.4.1 +version: 6.5.0 appVersion: 30.0.4 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 9a7d532a..a86b1371 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -28,6 +28,7 @@ helm install my-release nextcloud/nextcloud * [Headers set on NGINX](#headers-set-on-nginx) * [Probes Configurations](#probes-configurations) * [Collabora Configuration](#collabora-configuration) + * [Imaginary](#imaginary) * [Cron jobs](#cron-jobs) * [Using the nextcloud docker image auto-configuration via env vars](#using-the-nextcloud-docker-image-auto-configuration-via-env-vars) * [Multiple config.php file](#multiple-configphp-file) @@ -530,6 +531,50 @@ This section provides options to enable and configure the Collabora Online serve > > For more information, please check the [Collabora documentation](https://sdk.collaboraonline.com/docs/installation/index.html). +### Imaginary + +We include an optional external preview provider from [h2non/imaginary](https://github.com/h2non/imaginary). + +| Parameter | Description | Default | +|----------------------------------------|-----------------------------------------------------------------------------------------|-------------------| +| `imaginary.enabled` | Start Imaginary | `false` | +| `imaginary.replicaCount` | Number of imaginary pod replicas to deploy | `1` | +| `imaginary.image.registry` | Imaginary image name | `docker.io` | +| `imaginary.image.repository` | Imaginary image name | `h2non/imaginary` | +| `imaginary.image.tag` | Imaginary image tag | `1.2.4` | +| `imaginary.image.pullPolicy` | Imaginary image pull policy | `IfNotPresent` | +| `imaginary.image.pullSecrets` | Imaginary image pull secrets | `nil` | +| `imaginary.podAnnotations` | Additional annotations for imaginary | `{}` | +| `imaginary.podLabels` | Additional labels for imaginary | `{}` | +| `imaginary.resources` | imaginary resources | `{}` | +| `imaginary.securityContext` | Optional security context for the Imaginary container | `nil` | +| `imaginary.podSecurityContext` | Optional security context for the Imaginary pod (applies to all containers in the pod) | `nil` | +| `imaginary.service.type` | Imaginary: Kubernetes Service type | `ClusterIP` | +| `imaginary.service.loadBalancerIP` | Imaginary: LoadBalancerIp for service type LoadBalancer | `nil` | +| `imaginary.service.nodePort` | Imaginary: NodePort for service type NodePort | `nil` | +| `imaginary.service.annotations` | Additional annotations for service imaginary | `{}` | +| `imaginary.service.labels` | Additional labels for service imaginary | `{}` | + + +> [!Note] +> You also need to setup nextcloud, to use imaginary +```yaml +nextcloud: + defaultConfigs: + imaginary.config.php: true + configs: + previews.config.php: |- + array( + 0 => 'OC\\Preview\\Imaginary', + 1 => 'OC\\Preview\\ImaginaryPDF', + ); + +imaginary: + enabled: true +``` + ## Cron jobs To execute [background tasks](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html) by using system cron instead of default Ajax cron, set `cronjob.enabled` parameter to `true`. Background jobs are important for tasks that do not necessarily need user intervention, but still need to be executed frequently (cleaning up, sending some notifications, pulling RSS feeds, etc.). diff --git a/charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl b/charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl new file mode 100644 index 00000000..95719b15 --- /dev/null +++ b/charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl @@ -0,0 +1,4 @@ + 'http://{{ template "nextcloud.fullname" . }}-imaginary', +); diff --git a/charts/nextcloud/templates/imaginary/deployment.yaml b/charts/nextcloud/templates/imaginary/deployment.yaml new file mode 100644 index 00000000..3845a2a0 --- /dev/null +++ b/charts/nextcloud/templates/imaginary/deployment.yaml @@ -0,0 +1,88 @@ +{{- if .Values.imaginary.enabled }} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "nextcloud.fullname" . }}-imaginary + labels: + app.kubernetes.io/name: {{ include "nextcloud.name" . }} + helm.sh/chart: {{ include "nextcloud.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/component: imaginary +spec: + replicas: {{ .Values.imaginary.replicaCount }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "nextcloud.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: imaginary + template: + metadata: + annotations: + {{- toYaml .Values.imaginary.podAnnotations | nindent 8 }} + labels: + app.kubernetes.io/name: {{ include "nextcloud.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: imaginary + {{- with .Values.imaginary.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imaginary.image.pullSecrets }} + imagePullSecrets: + {{- range . }} + - name: {{ . }} + {{- end}} + {{- end }} + containers: + - name: imaginary + {{- with .Values.imaginary.image }} + image: "{{ .registry }}/{{ .repository }}:{{ .tag }}" + imagePullPolicy: {{ .pullPolicy }} + {{- end }} + env: + - name: PORT + value: "9000" + ports: + - name: http + containerPort: 9000 + {{- with .Values.imaginary.readinessProbe }} + {{- if .enabled }} + readinessProbe: + httpGet: + path: /health + port: http + scheme: HTTP + failureThreshold: {{ .failureThreshold }} + successThreshold: {{ .successThreshold }} + periodSeconds: {{ .periodSeconds }} + timeoutSeconds: {{ .timeoutSeconds }} + {{- end }} + {{- end }} + {{- with .Values.imaginary.livenessProbe }} + {{- if .enabled }} + livenessProbe: + httpGet: + path: /health + port: http + scheme: HTTP + failureThreshold: {{ .failureThreshold }} + successThreshold: {{ .successThreshold }} + periodSeconds: {{ .periodSeconds }} + timeoutSeconds: {{ .timeoutSeconds }} + {{- end }} + {{- end }} + {{- with .Values.imaginary.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.imaginary.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.imaginary.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} +{{- end }} diff --git a/charts/nextcloud/templates/imaginary/service.yaml b/charts/nextcloud/templates/imaginary/service.yaml new file mode 100644 index 00000000..7f4b09e0 --- /dev/null +++ b/charts/nextcloud/templates/imaginary/service.yaml @@ -0,0 +1,36 @@ +{{- if .Values.imaginary.enabled }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ template "nextcloud.fullname" . }}-imaginary + labels: + app.kubernetes.io/name: {{ include "nextcloud.name" . }} + helm.sh/chart: {{ include "nextcloud.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/component: imaginary + {{- with .Values.imaginary.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.imaginary.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.imaginary.service.type }} + {{- with .Values.imaginary.service.loadBalancerIP }} + loadBalancerIP: {{ . }} + {{- end }} + ports: + - name: http + port: 80 + targetPort: http + {{- with .Values.imaginary.service.nodePort }} + nodePort: {{ . }} + {{- end }} + selector: + app.kubernetes.io/name: {{ include "nextcloud.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: imaginary +{{- end }} diff --git a/charts/nextcloud/test-values/imaginary.yaml b/charts/nextcloud/test-values/imaginary.yaml new file mode 100644 index 00000000..a3139969 --- /dev/null +++ b/charts/nextcloud/test-values/imaginary.yaml @@ -0,0 +1,14 @@ +nextcloud: + defaultConfigs: + imaginary.config.php: true + configs: + previews.config.php: |- + array( + 0 => 'OC\\Preview\\Imaginary', + 1 => 'OC\\Preview\\ImaginaryPDF', + ); + +imaginary: + enabled: true diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 5bd685a0..b4a39c60 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -208,6 +208,8 @@ nextcloud: swift.config.php: true # disables the web based updater as the default nextcloud docker image does not support it upgrade-disable-web.config.php: true + # -- imaginary support config + imaginary.config.php: false # Extra config files created in /var/www/html/config/ # ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#multiple-config-php-file @@ -680,6 +682,71 @@ dnsConfig: {} # - name: ndots # value: "1" +imaginary: + # -- Start Imgaginary + enabled: false + # -- Number of imaginary pod replicas to deploy + replicaCount: 1 + + image: + # -- Imaginary image registry + registry: docker.io + # -- Imaginary image name + repository: h2non/imaginary + # -- Imaginary image tag + tag: 1.2.4 + # -- Imaginary image pull policy + pullPolicy: IfNotPresent + # -- Imaginary image pull secrets + pullSecrets: [] + + # -- Additional annotations for imaginary + podAnnotations: {} + # -- Additional labels for imaginary + podLabels: {} + # -- imaginary resources + resources: {} + + # -- Optional security context for the Imaginary container + securityContext: + runAsUser: 1000 + runAsNonRoot: true + # allowPrivilegeEscalation: false + # capabilities: + # drop: + # - ALL + + # -- Optional security context for the Imaginary pod (applies to all containers in the pod) + podSecurityContext: {} + # runAsNonRoot: true + # seccompProfile: + # type: RuntimeDefault + + readinessProbe: + enabled: true + failureThreshold: 3 + successThreshold: 1 + periodSeconds: 10 + timeoutSeconds: 1 + livenessProbe: + enabled: true + failureThreshold: 3 + successThreshold: 1 + periodSeconds: 10 + timeoutSeconds: 1 + + service: + # -- Imaginary: Kubernetes Service type + type: ClusterIP + # -- Imaginary: LoadBalancerIp for service type LoadBalancer + loadBalancerIP: + # -- Imaginary: NodePort for service type NodePort + nodePort: + # -- Additional annotations for service imaginary + annotations: {} + # -- Additional labels for service imaginary + labels: {} + ## Prometheus Exporter / Metrics ## metrics: From 0de8f89c057ce2e6566e162fa6ce8be00fe3e262 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Wed, 23 Oct 2024 17:02:55 +0200 Subject: [PATCH 03/11] chore(nextcloud): move enabledPreviewProviders to default config Signed-off-by: WrenIX Signed-off-by: GreyXor --- charts/nextcloud/README.md | 8 -------- .../defaultConfigs/imaginary.config.php.tpl | 19 +++++++++++++++++++ charts/nextcloud/test-values/imaginary.yaml | 8 -------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index a86b1371..67869d66 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -562,14 +562,6 @@ We include an optional external preview provider from [h2non/imaginary](https:// nextcloud: defaultConfigs: imaginary.config.php: true - configs: - previews.config.php: |- - array( - 0 => 'OC\\Preview\\Imaginary', - 1 => 'OC\\Preview\\ImaginaryPDF', - ); imaginary: enabled: true diff --git a/charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl b/charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl index 95719b15..628851d8 100644 --- a/charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl +++ b/charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl @@ -1,4 +1,23 @@ 'http://{{ template "nextcloud.fullname" . }}-imaginary', + 'enable_previews' => true, + 'enabledPreviewProviders' => array ( + 'OC\Preview\Imaginary', + 'OC\Preview\ImaginaryPDF', + /* + defaults: + https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#enabledpreviewproviders + */ + 'OC\Preview\BMP', + // 'OC\Preview\GIF', + // 'OC\Preview\JPEG', + 'OC\Preview\Krita', + 'OC\Preview\MarkDown', + 'OC\Preview\MP3', + 'OC\Preview\OpenDocument', + // 'OC\Preview\PNG', + 'OC\Preview\TXT', + 'OC\Preview\XBitmap', + ), ); diff --git a/charts/nextcloud/test-values/imaginary.yaml b/charts/nextcloud/test-values/imaginary.yaml index a3139969..389a1580 100644 --- a/charts/nextcloud/test-values/imaginary.yaml +++ b/charts/nextcloud/test-values/imaginary.yaml @@ -1,14 +1,6 @@ nextcloud: defaultConfigs: imaginary.config.php: true - configs: - previews.config.php: |- - array( - 0 => 'OC\\Preview\\Imaginary', - 1 => 'OC\\Preview\\ImaginaryPDF', - ); imaginary: enabled: true From c64cfd570693e87358091718ef4f35bfcf7c6569 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Mon, 4 Nov 2024 19:21:19 +0100 Subject: [PATCH 04/11] fix(ci): run test for preview Signed-off-by: WrenIX Signed-off-by: GreyXor --- .github/tests/test_job.yaml | 63 +++++++++++++++++++ .github/tests/test_upload_job.yaml | 26 -------- .github/workflows/lint-test.yaml | 22 ++++--- charts/nextcloud/test-values/imaginary.yaml | 6 ++ .../test-values/s3-as-primary-storage.yaml | 3 + 5 files changed, 85 insertions(+), 35 deletions(-) create mode 100644 .github/tests/test_job.yaml delete mode 100644 .github/tests/test_upload_job.yaml diff --git a/.github/tests/test_job.yaml b/.github/tests/test_job.yaml new file mode 100644 index 00000000..680b7d20 --- /dev/null +++ b/.github/tests/test_job.yaml @@ -0,0 +1,63 @@ +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: test-nextcloud + namespace: nextcloud +spec: + template: + metadata: + name: test-nextcloud + spec: + initContainers: + - name: 05-create-nextcloud-file + image: curlimages/curl + command: + - /bin/sh + - -c + - | + set -e + echo "download image:" + curl -s "https://upload.wikimedia.org/wikipedia/commons/d/df/Open_data.png" -o test_upload.png + echo "upload to nextcloud:" + curl \ + -s \ + -w "%{http_code}" \ + -u admin:changeme \ + -T test_upload.png \ + "http://nextcloud.nextcloud.svc.cluster.local:8080/remote.php/dav/files/admin/test_upload.png" || exit 1; + echo "done" + - name: 10-generate-preview + image: docker.io/library/nextcloud:latest + command: + - /bin/sh + - -c + - | + set -e + echo "fetch preview:" + OUTPUT=$(curl \ + -s \ + -w "%{http_code}" \ + -u admin:changeme \ + "http://nextcloud.nextcloud.svc.cluster.local:8080/index.php/core/preview.png?file=test_upload.png&x=128&y=128&mimeFallback=true&a=0" \ + -o - | file -) + echo "${OUTPUT}"; + if ! echo "${OUTPUT}" | grep -q "PNG"; then + echo "PNG was not detected" + exit 1; + fi + if ! echo "${OUTPUT}" | grep -q "256 x 256"; then + echo "Image size is incorrect" + exit 1; + fi + echo "done" + containers: + - name: final + image: curlimages/curl + command: + - /bin/sh + - -c + - | + set -e + echo "All tests run successfull (initContainer in given order)" + restartPolicy: Never diff --git a/.github/tests/test_upload_job.yaml b/.github/tests/test_upload_job.yaml deleted file mode 100644 index ec9b9a17..00000000 --- a/.github/tests/test_upload_job.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: create-nextcloud-file - namespace: nextcloud -spec: - template: - metadata: - name: create-nextcloud-file - spec: - containers: - - name: create-nextcloud-file - image: curlimages/curl - command: - - /bin/sh - - -c - - | - echo "testing123" > test_upload.txt && \ - curl \ - -w "%{http_code}" \ - -u admin:changeme \ - -T test_upload.txt \ - "http://nextcloud.nextcloud.svc.cluster.local:8080/remote.php/dav/files/admin/test_upload.txt" && \ - echo -e "\nTried to uploaded a file, test_upload.txt, to Nextcloud." - restartPolicy: Never diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index fd32a2ff..dd849ef9 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -88,10 +88,12 @@ jobs: # 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 "--values charts/nextcloud/test-values/s3-as-primary-storage.yaml" + test: true # test the helm chart with imaginary - name: Imaginary Enabled - helm_args: --helm-extra-set-args "--values charts/nextcloud/test-values/imaginary.yaml" + helm_args: --namespace nextcloud --skip-clean-up --helm-extra-set-args "--create-namespace --values charts/nextcloud/test-values/imaginary.yaml" + test: true steps: - name: Checkout @@ -144,18 +146,20 @@ jobs: if: steps.list-changed.outputs.changed == 'true' run: ct install --target-branch ${{ github.event.repository.default_branch }} ${{ matrix.test_cases.helm_args }} - - name: Try adding a file to Nextcloud - if: matrix.test_cases.name == 'S3 Enabled as Primary Storage' + - name: Run test for Nextcloud + if: matrix.test_cases.test # applies a kubernetes job that uploads a file and then checks log of finished pod run: | + EXIT=0 kubectl config set-context --current --namespace=nextcloud && \ - kubectl apply -f ./.github/tests/test_upload_job.yaml --wait=true && \ + kubectl apply -f ./.github/tests/test_job.yaml --wait=true && \ sleep 2 && \ - kubectl wait --for=condition=Complete --timeout=2m job/create-nextcloud-file && \ - echo "Here's the logs from the job:" && \ - kubectl logs --tail=-1 -f -l batch.kubernetes.io/job-name=create-nextcloud-file && \ - echo "Here's the logs from the nextcloud pod:" && \ - kubectl logs -l app.kubernetes.io/name=nextcloud + kubectl wait --for=condition=Complete --timeout=2m job/test-nextcloud || EXIT=1 + echo "Here's the logs from the job:" + kubectl logs --ignore-errors --prefix --tail=-1 --all-containers=true -l batch.kubernetes.io/job-name=test-nextcloud + echo "Here's the logs from the nextcloud pod:" + kubectl logs --ignore-errors --prefix -l app.kubernetes.io/name=nextcloud + exit $EXIT summary: runs-on: ubuntu-latest-low diff --git a/charts/nextcloud/test-values/imaginary.yaml b/charts/nextcloud/test-values/imaginary.yaml index 389a1580..e055edbe 100644 --- a/charts/nextcloud/test-values/imaginary.yaml +++ b/charts/nextcloud/test-values/imaginary.yaml @@ -1,4 +1,10 @@ +fullnameOverride: nextcloud + nextcloud: + host: nextcloud + trustedDomains: + - 'nextcloud.nextcloud.svc.cluster.local' + - 'nextcloud' defaultConfigs: imaginary.config.php: true diff --git a/charts/nextcloud/test-values/s3-as-primary-storage.yaml b/charts/nextcloud/test-values/s3-as-primary-storage.yaml index 6e82f550..8baf27d2 100644 --- a/charts/nextcloud/test-values/s3-as-primary-storage.yaml +++ b/charts/nextcloud/test-values/s3-as-primary-storage.yaml @@ -8,6 +8,9 @@ nginx: nextcloud: host: nextcloud + trustedDomains: + - 'nextcloud.nextcloud.svc.cluster.local' + - 'nextcloud' objectStore: s3: enabled: true From 6d1100e8770d66c1ddf48f9023b0afc39bc0bb0d Mon Sep 17 00:00:00 2001 From: Dominic Giebert Date: Mon, 29 Jul 2024 11:11:59 +0200 Subject: [PATCH 05/11] fix(defaultConfigs): update from docker Signed-off-by: Dominic Giebert Signed-off-by: WrenIX Signed-off-by: GreyXor --- charts/nextcloud/Chart.yaml | 2 +- .../files/defaultConfigs/apps.config.php.tpl | 14 +++++++------- .../defaultConfigs/reverse-proxy.config.php.tpl | 5 +++++ .../files/defaultConfigs/s3.config.php.tpl | 4 ++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 8b3b58cc..cf19d528 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 6.5.0 +version: 6.5.1 appVersion: 30.0.4 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/files/defaultConfigs/apps.config.php.tpl b/charts/nextcloud/files/defaultConfigs/apps.config.php.tpl index a4bed833..4c37f72a 100644 --- a/charts/nextcloud/files/defaultConfigs/apps.config.php.tpl +++ b/charts/nextcloud/files/defaultConfigs/apps.config.php.tpl @@ -1,15 +1,15 @@ array ( + 'apps_paths' => array ( 0 => array ( - "path" => OC::$SERVERROOT."/apps", - "url" => "/apps", - "writable" => false, + 'path' => OC::$SERVERROOT.'/apps', + 'url' => '/apps', + 'writable' => false, ), 1 => array ( - "path" => OC::$SERVERROOT."/custom_apps", - "url" => "/custom_apps", - "writable" => true, + 'path' => OC::$SERVERROOT.'/custom_apps', + 'url' => '/custom_apps', + 'writable' => true, ), ), ); diff --git a/charts/nextcloud/files/defaultConfigs/reverse-proxy.config.php.tpl b/charts/nextcloud/files/defaultConfigs/reverse-proxy.config.php.tpl index 7df0415e..30c660ff 100644 --- a/charts/nextcloud/files/defaultConfigs/reverse-proxy.config.php.tpl +++ b/charts/nextcloud/files/defaultConfigs/reverse-proxy.config.php.tpl @@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES'); if ($trustedProxies) { $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies))); } + +$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS'); +if ($forwardedForHeaders) { + $CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders))); +} diff --git a/charts/nextcloud/files/defaultConfigs/s3.config.php.tpl b/charts/nextcloud/files/defaultConfigs/s3.config.php.tpl index 9941c562..a17e4037 100644 --- a/charts/nextcloud/files/defaultConfigs/s3.config.php.tpl +++ b/charts/nextcloud/files/defaultConfigs/s3.config.php.tpl @@ -14,8 +14,8 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", - 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, - 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, + 'autocreate' => strtolower($autocreate) !== 'false', + 'use_ssl' => strtolower($use_ssl) !== 'false', // required for some non Amazon S3 implementations 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false', // required for older protocol versions From eade753cc824ba07668f6ecff07981ba86ee1f89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:18:51 +0000 Subject: [PATCH 06/11] chore(deps): bump helm/kind-action from 1.11.0 to 1.12.0 Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.11.0 to 1.12.0. - [Release notes](https://github.com/helm/kind-action/releases) - [Commits](https://github.com/helm/kind-action/compare/v1.11.0...v1.12.0) --- updated-dependencies: - dependency-name: helm/kind-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: GreyXor --- .github/workflows/lint-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index dd849ef9..d5d5caef 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -123,7 +123,7 @@ jobs: fi - name: Create kind cluster - uses: helm/kind-action@v1.11.0 + uses: helm/kind-action@v1.12.0 if: steps.list-changed.outputs.changed == 'true' - name: Install MinIO for testing S3 as Primary Storage From 81d38d7c5588a68c2290af93da29575f4296f54e Mon Sep 17 00:00:00 2001 From: Wagner Santos <7467450+wagoid@users.noreply.github.com> Date: Fri, 27 Dec 2024 07:32:04 -0300 Subject: [PATCH 07/11] docs: fix typo in s3 config Signed-off-by: wagoid <7467450+wagoid@users.noreply.github.com> Signed-off-by: Wagner Santos <7467450+wagoid@users.noreply.github.com> Signed-off-by: GreyXor --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index cf19d528..3572be6c 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 6.5.1 +version: 6.5.2 appVersion: 30.0.4 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 67869d66..6031ea4c 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -320,8 +320,8 @@ Here are all the values you can currently configure in this helm chart to config | Parameter | Description | Default | |-------------------------------------------------|-----------------------------------------------------------------------|-------------| | `nextcloud.objectStore.s3.enabled` | enable configuring S3 as a primary object store | `false` | -| `nextcloud.objectStore.s3.accessKey` | accessKeyID for authing to S3, ignored if using existinSecret | `''` | -| `nextcloud.objectStore.s3.secretKey` | secretAccessKey for authing to S3, ignored if using existinSecret | `''` | +| `nextcloud.objectStore.s3.accessKey` | accessKeyID for authing to S3, ignored if using existingSecret | `''` | +| `nextcloud.objectStore.s3.secretKey` | secretAccessKey for authing to S3, ignored if using existingSecret | `''` | | `nextcloud.objectStore.s3.legacyAuth` | use legacy authentication for S3 | `false` | | `nextcloud.objectStore.s3.host` | endpoint URL to connect to. Only required if not using AWS | `''` | | `nextcloud.objectStore.s3.ssl` | Use TLS connection when connecting to S3 | `true` | From 96a43e1d4768b1819ea1bdf5e0f66f58f8c7083f Mon Sep 17 00:00:00 2001 From: Joshua Chapman Date: Sun, 5 Jan 2025 10:35:00 +0100 Subject: [PATCH 08/11] feat(imaginary): add nodeSelector and tolerations Signed-off-by: Joshua Chapman Signed-off-by: GreyXor --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/README.md | 2 ++ charts/nextcloud/templates/imaginary/deployment.yaml | 8 ++++++++ charts/nextcloud/values.yaml | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 3572be6c..026c17e9 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 6.5.2 +version: 6.6.2 appVersion: 30.0.4 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 6031ea4c..0bdbf83d 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -546,6 +546,8 @@ We include an optional external preview provider from [h2non/imaginary](https:// | `imaginary.image.pullSecrets` | Imaginary image pull secrets | `nil` | | `imaginary.podAnnotations` | Additional annotations for imaginary | `{}` | | `imaginary.podLabels` | Additional labels for imaginary | `{}` | +| `imaginary.nodeSelector` | Imaginary pod nodeSelector | `{}` | +| `imaginary.tolerations` | Imaginary pod tolerations | `[]` | | `imaginary.resources` | imaginary resources | `{}` | | `imaginary.securityContext` | Optional security context for the Imaginary container | `nil` | | `imaginary.podSecurityContext` | Optional security context for the Imaginary pod (applies to all containers in the pod) | `nil` | diff --git a/charts/nextcloud/templates/imaginary/deployment.yaml b/charts/nextcloud/templates/imaginary/deployment.yaml index 3845a2a0..ff154df4 100644 --- a/charts/nextcloud/templates/imaginary/deployment.yaml +++ b/charts/nextcloud/templates/imaginary/deployment.yaml @@ -85,4 +85,12 @@ spec: securityContext: {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.imaginary.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.imaginary.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index b4a39c60..a0b9c7d2 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -704,6 +704,11 @@ imaginary: podAnnotations: {} # -- Additional labels for imaginary podLabels: {} + # -- Imaginary pod nodeSelector + nodeSelector: {} + # -- Imaginary pod tolerations + tolerations: [] + # -- imaginary resources resources: {} From 436350e2d29bc510c9251e3cb5f81617d6797ba2 Mon Sep 17 00:00:00 2001 From: GreyXor Date: Sun, 12 Jan 2025 20:10:45 +0100 Subject: [PATCH 09/11] chore: upgrade dependencies Signed-off-by: GreyXor --- charts/nextcloud/Chart.lock | 6 +++--- charts/nextcloud/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/nextcloud/Chart.lock b/charts/nextcloud/Chart.lock index aacdcb41..447f148e 100644 --- a/charts/nextcloud/Chart.lock +++ b/charts/nextcloud/Chart.lock @@ -1,7 +1,7 @@ dependencies: - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 15.5.0 + version: 16.3.5 - name: mariadb repository: oci://registry-1.docker.io/bitnamicharts version: 18.2.0 @@ -11,5 +11,5 @@ dependencies: - name: collabora-online repository: https://collaboraonline.github.io/online version: 1.1.20 -digest: sha256:00e8d82d28825fd3f46e7e7d888d1aac93ebdb5135f6a4d7e6ae0c3155881c27 -generated: "2024-12-15T19:47:53.357052+01:00" +digest: sha256:c15e97de1c3acf872f73356faa838b59718a1c723c4f698422dbd8a7616e3d69 +generated: "2025-01-12T20:10:26.935856912+01:00" diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 026c17e9..8d4f04a1 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -23,7 +23,7 @@ maintainers: email: jeff@billimek.com dependencies: - name: postgresql - version: 15.5.0 + version: 16.3.5 repository: oci://registry-1.docker.io/bitnamicharts condition: postgresql.enabled - name: mariadb From 82fa500151f978ed947329cace6c3e6c9b3b0001 Mon Sep 17 00:00:00 2001 From: GreyXor Date: Sun, 12 Jan 2025 20:13:44 +0100 Subject: [PATCH 10/11] chore: upgrade dependencies Signed-off-by: GreyXor --- charts/nextcloud/Chart.lock | 8 ++++---- charts/nextcloud/Chart.yaml | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/nextcloud/Chart.lock b/charts/nextcloud/Chart.lock index 447f148e..a9029c69 100644 --- a/charts/nextcloud/Chart.lock +++ b/charts/nextcloud/Chart.lock @@ -4,12 +4,12 @@ dependencies: version: 16.3.5 - name: mariadb repository: oci://registry-1.docker.io/bitnamicharts - version: 18.2.0 + version: 20.2.1 - name: redis repository: oci://registry-1.docker.io/bitnamicharts - version: 19.6.4 + version: 20.6.0 - name: collabora-online repository: https://collaboraonline.github.io/online version: 1.1.20 -digest: sha256:c15e97de1c3acf872f73356faa838b59718a1c723c4f698422dbd8a7616e3d69 -generated: "2025-01-12T20:10:26.935856912+01:00" +digest: sha256:0d0aa377c2b2411bb5c42329c15cf652fbfc7badf9e896d1953c24a928af9562 +generated: "2025-01-12T20:13:27.705912683+01:00" diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 8d4f04a1..f2156eea 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: nextcloud -version: 6.6.2 -appVersion: 30.0.4 +version: 7.0.0 +appVersion: 31.0.0 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: - nextcloud @@ -27,15 +27,15 @@ dependencies: repository: oci://registry-1.docker.io/bitnamicharts condition: postgresql.enabled - name: mariadb - version: 18.2.0 + version: 20.2.1 repository: oci://registry-1.docker.io/bitnamicharts condition: mariadb.enabled - name: redis - version: 19.6.4 + version: 20.6.0 repository: oci://registry-1.docker.io/bitnamicharts condition: redis.enabled - name: collabora-online version: 1.1.20 repository: https://collaboraonline.github.io/online condition: collabora.enabled - alias: collabora + alias: collabora \ No newline at end of file From 9d61903e1819a136adf469ff2db2fffb9e637277 Mon Sep 17 00:00:00 2001 From: GreyXor Date: Tue, 25 Feb 2025 09:37:56 +0100 Subject: [PATCH 11/11] chore: upgrade postgresql dependency to 16.4.14 Signed-off-by: GreyXor --- charts/nextcloud/Chart.lock | 6 +++--- charts/nextcloud/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/nextcloud/Chart.lock b/charts/nextcloud/Chart.lock index a9029c69..94c1296f 100644 --- a/charts/nextcloud/Chart.lock +++ b/charts/nextcloud/Chart.lock @@ -1,7 +1,7 @@ dependencies: - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 16.3.5 + version: 16.4.14 - name: mariadb repository: oci://registry-1.docker.io/bitnamicharts version: 20.2.1 @@ -11,5 +11,5 @@ dependencies: - name: collabora-online repository: https://collaboraonline.github.io/online version: 1.1.20 -digest: sha256:0d0aa377c2b2411bb5c42329c15cf652fbfc7badf9e896d1953c24a928af9562 -generated: "2025-01-12T20:13:27.705912683+01:00" +digest: sha256:60495c5fe12eba4d6732581139cc62defc092541c42e097685976a6de45865f7 +generated: "2025-02-25T09:36:49.928250314+01:00" diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index f2156eea..d5451f14 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -23,7 +23,7 @@ maintainers: email: jeff@billimek.com dependencies: - name: postgresql - version: 16.3.5 + version: 16.4.14 repository: oci://registry-1.docker.io/bitnamicharts condition: postgresql.enabled - name: mariadb