Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

Commit 1527d15

Browse files
committed
Merge remote-tracking branch 'origin/main'
# Conflicts: # charts/nextcloud/Chart.lock # charts/nextcloud/Chart.yaml
2 parents f6c92bc + ed0cb34 commit 1527d15

File tree

16 files changed

+470
-49
lines changed

16 files changed

+470
-49
lines changed

.github/tests/test_job.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
apiVersion: batch/v1
3+
kind: Job
4+
metadata:
5+
name: test-nextcloud
6+
namespace: nextcloud
7+
spec:
8+
template:
9+
metadata:
10+
name: test-nextcloud
11+
spec:
12+
initContainers:
13+
- name: 05-create-nextcloud-file
14+
image: curlimages/curl
15+
command:
16+
- /bin/sh
17+
- -c
18+
- |
19+
set -e
20+
echo "download image:"
21+
curl -s "https://upload.wikimedia.org/wikipedia/commons/d/df/Open_data.png" -o test_upload.png
22+
echo "upload to nextcloud:"
23+
curl \
24+
-s \
25+
-w "%{http_code}" \
26+
-u admin:changeme \
27+
-T test_upload.png \
28+
"http://nextcloud.nextcloud.svc.cluster.local:8080/remote.php/dav/files/admin/test_upload.png" || exit 1;
29+
echo "done"
30+
- name: 10-generate-preview
31+
image: docker.io/library/nextcloud:latest
32+
command:
33+
- /bin/sh
34+
- -c
35+
- |
36+
set -e
37+
echo "fetch preview:"
38+
OUTPUT=$(curl \
39+
-s \
40+
-w "%{http_code}" \
41+
-u admin:changeme \
42+
"http://nextcloud.nextcloud.svc.cluster.local:8080/index.php/core/preview.png?file=test_upload.png&x=128&y=128&mimeFallback=true&a=0" \
43+
-o - | file -)
44+
echo "${OUTPUT}";
45+
if ! echo "${OUTPUT}" | grep -q "PNG"; then
46+
echo "PNG was not detected"
47+
exit 1;
48+
fi
49+
if ! echo "${OUTPUT}" | grep -q "256 x 256"; then
50+
echo "Image size is incorrect"
51+
exit 1;
52+
fi
53+
echo "done"
54+
containers:
55+
- name: final
56+
image: curlimages/curl
57+
command:
58+
- /bin/sh
59+
- -c
60+
- |
61+
set -e
62+
echo "All tests run successfull (initContainer in given order)"
63+
restartPolicy: Never

.github/tests/test_upload_job.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/lint-test.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- name: Add dependency chart repos
4040
run: |
4141
helm repo add bitnami https://charts.bitnami.com/bitnami
42+
helm repo add collabora-online https://collaboraonline.github.io/online
4243
4344
- name: Set up chart-testing
4445
uses: helm/chart-testing-action@v2.6.1
@@ -87,6 +88,12 @@ jobs:
8788
# we need to skip the clean up so we can test adding a file
8889
helm_args: |
8990
--namespace nextcloud --skip-clean-up --helm-extra-set-args "--values charts/nextcloud/test-values/s3-as-primary-storage.yaml"
91+
test: true
92+
93+
# test the helm chart with imaginary
94+
- name: Imaginary Enabled
95+
helm_args: --namespace nextcloud --skip-clean-up --helm-extra-set-args "--create-namespace --values charts/nextcloud/test-values/imaginary.yaml"
96+
test: true
9097

9198
steps:
9299
- name: Checkout
@@ -102,6 +109,7 @@ jobs:
102109
- name: Add dependency chart repos
103110
run: |
104111
helm repo add bitnami https://charts.bitnami.com/bitnami
112+
helm repo add collabora-online https://collaboraonline.github.io/online
105113
106114
- name: Set up chart-testing
107115
uses: helm/chart-testing-action@v2.6.1
@@ -138,18 +146,20 @@ jobs:
138146
if: steps.list-changed.outputs.changed == 'true'
139147
run: ct install --target-branch ${{ github.event.repository.default_branch }} ${{ matrix.test_cases.helm_args }}
140148

141-
- name: Try adding a file to Nextcloud
142-
if: matrix.test_cases.name == 'S3 Enabled as Primary Storage'
149+
- name: Run test for Nextcloud
150+
if: matrix.test_cases.test
143151
# applies a kubernetes job that uploads a file and then checks log of finished pod
144152
run: |
153+
EXIT=0
145154
kubectl config set-context --current --namespace=nextcloud && \
146-
kubectl apply -f ./.github/tests/test_upload_job.yaml --wait=true && \
155+
kubectl apply -f ./.github/tests/test_job.yaml --wait=true && \
147156
sleep 2 && \
148-
kubectl wait --for=condition=Complete --timeout=2m job/create-nextcloud-file && \
149-
echo "Here's the logs from the job:" && \
150-
kubectl logs --tail=-1 -f -l batch.kubernetes.io/job-name=create-nextcloud-file && \
151-
echo "Here's the logs from the nextcloud pod:" && \
152-
kubectl logs -l app.kubernetes.io/name=nextcloud
157+
kubectl wait --for=condition=Complete --timeout=2m job/test-nextcloud || EXIT=1
158+
echo "Here's the logs from the job:"
159+
kubectl logs --ignore-errors --prefix --tail=-1 --all-containers=true -l batch.kubernetes.io/job-name=test-nextcloud
160+
echo "Here's the logs from the nextcloud pod:"
161+
kubectl logs --ignore-errors --prefix -l app.kubernetes.io/name=nextcloud
162+
exit $EXIT
153163
154164
summary:
155165
runs-on: ubuntu-latest

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- name: Add dependency chart repos
3636
run: |
3737
helm repo add bitnami https://charts.bitnami.com/bitnami
38+
helm repo add collabora https://collaboraonline.github.io/online/
3839
3940
- name: Run chart-releaser
4041
uses: helm/chart-releaser-action@v1.6.0

charts/nextcloud/Chart.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ dependencies:
88
- name: redis
99
repository: oci://registry-1.docker.io/bitnamicharts
1010
version: 20.4.0
11-
digest: sha256:2be1a22db588149dc967301cdcbb074ccdd3c1124128d4edc82a39dd03e92c03
12-
generated: "2024-12-09T12:08:04.90799833Z"
11+
- name: collabora-online
12+
repository: https://collaboraonline.github.io/online
13+
version: 1.1.20
14+
digest: sha256:97c4fa6bb7fac4ee45dc08f5dff094280e79fefb3cf222cb6e198cf5efe9a2ba
15+
generated: "2024-12-23T15:45:30.659899+01:00"

charts/nextcloud/Chart.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 6.3.0-build.2
4-
appVersion: 30.0.2
3+
version: 6.5.1
4+
appVersion: 30.0.4
55
description: A file sharing server that puts the control and security of your own data back into your hands.
66
keywords:
77
- nextcloud
@@ -34,3 +34,8 @@ dependencies:
3434
version: 20.4.0
3535
repository: oci://registry-1.docker.io/bitnamicharts
3636
condition: redis.enabled
37+
- name: collabora-online
38+
version: 1.1.20
39+
repository: https://collaboraonline.github.io/online
40+
condition: collabora.enabled
41+
alias: collabora

charts/nextcloud/README.md

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ helm install my-release nextcloud/nextcloud
1616
* [Installing the Chart](#installing-the-chart)
1717
* [Uninstalling the Chart](#uninstalling-the-chart)
1818
* [Configuration](#configuration)
19-
* [Ingress-Controller](#ingress)
19+
* [Ingress](#ingress)
20+
* [Ingress Sticky-Sessions](#ingress-sticky-sessions)
21+
* [NGINX Ingress-Controller](#nginx-ingress-controller)
22+
* [Traefik Ingress-Controller](#traefik-ingress-controller)
23+
* [HAProxy Ingress-Controller (Community-Version)](#haproxy-ingress-controller-community-version)
2024
* [Database Configurations](#database-configurations)
2125
* [Object Storage as Primary Storage Configuration](#object-storage-as-primary-storage-configuration)
2226
* [Persistence Configurations](#persistence-configurations)
2327
* [Metrics Configurations](#metrics-configurations)
24-
* [Headers set on nginx](#headers-set-on-nginx)
28+
* [Headers set on NGINX](#headers-set-on-nginx)
2529
* [Probes Configurations](#probes-configurations)
30+
* [Collabora Configuration](#collabora-configuration)
31+
* [Imaginary](#imaginary)
2632
* [Cron jobs](#cron-jobs)
2733
* [Using the nextcloud docker image auto-configuration via env vars](#using-the-nextcloud-docker-image-auto-configuration-via-env-vars)
2834
* [Multiple config.php file](#multiple-configphp-file)
@@ -494,6 +500,73 @@ The nextcloud deployment includes a series of different probes you can use to de
494500
> [!Note]
495501
> If you are getting errors on initialization (such as `Fatal error: require_once(): Failed opening required '/var/www/html/lib/versioncheck.php'`, but you can get other errors as well), a good first step is to try and enable the startupProbe and/or increase the `initialDelaySeconds` for the `livenessProbe` and `readinessProbe` to something much greater (consider using `120` seconds instead of `10`. This is an especially good idea if your cluster is running on older hardware, has a slow internet connection, or you're using a slower storage class, such as NFS that's running with older disks or a slow connection.
496502

503+
### Collabora Configuration
504+
505+
This section provides options to enable and configure the Collabora Online server within your deployment. Please ensure to review the [Collabora Online Helm chart documentation](https://github.com/CollaboraOnline/online/tree/master/kubernetes/helm/collabora-online) for additional details and recommended values.
506+
507+
| Parameter | Description | Default |
508+
|----------------------------------------|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
509+
| `collabora.enabled` | Enable or disable the Collabora Online integration | `false` |
510+
| `collabora.autoscaling.enabled` | Enable or disable autoscaling for the Collabora Online pods | `false` |
511+
| `collabora.collabora.aliasgroups` | List of HTTPS nextcloud domains if Collabora is behind a reverse proxy | `[]` |
512+
| `collabora.collabora.extra_params` | Additional parameters for the Collabora Online service | `"--o:ssl.enabled=false"` |
513+
| `collabora.collabora.server_name` | Specify the server name when the hostname is not directly reachable (e.g., behind a reverse proxy) | `null` |
514+
| `collabora.existingSecret.enabled` | Enable using existing secret for admin login credentials | `false` |
515+
| `collabora.existingSecret.secretName` | Name of the existing secret containing admin login credentials | `""` |
516+
| `collabora.existingSecret.usernameKey` | Key in the secret for the admin username | `"username"` |
517+
| `collabora.existingSecret.passwordKey` | Key in the secret for the admin password | `"password"` |
518+
| `collabora.collabora.username` | Admin username for Collabora Online | `admin` |
519+
| `collabora.collabora.password` | Admin password for Collabora Online | `examplepass` |
520+
| `collabora.ingress.enabled` | Enable or disable ingress for Collabora Online | `false` |
521+
| `collabora.ingress.className` | Class name for the ingress controller | `""` |
522+
| `collabora.ingress.annotations` | Annotations for the ingress resource | `{}` |
523+
| `collabora.ingress.hosts` | List of hosts for the Collabora ingress | `[{"host": "chart-example.local", "paths": [{"path": "/", "pathType": "ImplementationSpecific"}]}]` |
524+
| `collabora.ingress.tls` | TLS configuration for the Collabora ingress | `[]` |
525+
| `collabora.resources` | Resource requests and limits for the Collabora Online pods | `{}` |
526+
> **Note**:
527+
>
528+
> You may need to uncomment `collabora.collabora.aliasgroups` and `collabora.collabora.extra_params`, depending on your setup. You may also need to set `collabora.collabora.server_name`. If left empty, it's derived from the request, so please set it if it doesn't work.
529+
>
530+
> If you have both Nextcloud and Collabora behind a reverse proxy with HTTPS, `collabora.collabora.aliasgroups` should match your Nextcloud domain and `collabora.collabora.server_name` (if needed) should match your Collabora domain.
531+
>
532+
> For more information, please check the [Collabora documentation](https://sdk.collaboraonline.com/docs/installation/index.html).
533+
534+
### Imaginary
535+
536+
We include an optional external preview provider from [h2non/imaginary](https://github.com/h2non/imaginary).
537+
538+
| Parameter | Description | Default |
539+
|----------------------------------------|-----------------------------------------------------------------------------------------|-------------------|
540+
| `imaginary.enabled` | Start Imaginary | `false` |
541+
| `imaginary.replicaCount` | Number of imaginary pod replicas to deploy | `1` |
542+
| `imaginary.image.registry` | Imaginary image name | `docker.io` |
543+
| `imaginary.image.repository` | Imaginary image name | `h2non/imaginary` |
544+
| `imaginary.image.tag` | Imaginary image tag | `1.2.4` |
545+
| `imaginary.image.pullPolicy` | Imaginary image pull policy | `IfNotPresent` |
546+
| `imaginary.image.pullSecrets` | Imaginary image pull secrets | `nil` |
547+
| `imaginary.podAnnotations` | Additional annotations for imaginary | `{}` |
548+
| `imaginary.podLabels` | Additional labels for imaginary | `{}` |
549+
| `imaginary.resources` | imaginary resources | `{}` |
550+
| `imaginary.securityContext` | Optional security context for the Imaginary container | `nil` |
551+
| `imaginary.podSecurityContext` | Optional security context for the Imaginary pod (applies to all containers in the pod) | `nil` |
552+
| `imaginary.service.type` | Imaginary: Kubernetes Service type | `ClusterIP` |
553+
| `imaginary.service.loadBalancerIP` | Imaginary: LoadBalancerIp for service type LoadBalancer | `nil` |
554+
| `imaginary.service.nodePort` | Imaginary: NodePort for service type NodePort | `nil` |
555+
| `imaginary.service.annotations` | Additional annotations for service imaginary | `{}` |
556+
| `imaginary.service.labels` | Additional labels for service imaginary | `{}` |
557+
558+
559+
> [!Note]
560+
> You also need to setup nextcloud, to use imaginary
561+
```yaml
562+
nextcloud:
563+
defaultConfigs:
564+
imaginary.config.php: true
565+
566+
imaginary:
567+
enabled: true
568+
```
569+
497570
## Cron jobs
498571

499572
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.).
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22
$CONFIG = array (
3-
"apps_paths" => array (
3+
'apps_paths' => array (
44
0 => array (
5-
"path" => OC::$SERVERROOT."/apps",
6-
"url" => "/apps",
7-
"writable" => false,
5+
'path' => OC::$SERVERROOT.'/apps',
6+
'url' => '/apps',
7+
'writable' => false,
88
),
99
1 => array (
10-
"path" => OC::$SERVERROOT."/custom_apps",
11-
"url" => "/custom_apps",
12-
"writable" => true,
10+
'path' => OC::$SERVERROOT.'/custom_apps',
11+
'url' => '/custom_apps',
12+
'writable' => true,
1313
),
1414
),
1515
);
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
$CONFIG = array (
3+
'preview_imaginary_url' => 'http://{{ template "nextcloud.fullname" . }}-imaginary',
4+
'enable_previews' => true,
5+
'enabledPreviewProviders' => array (
6+
'OC\Preview\Imaginary',
7+
'OC\Preview\ImaginaryPDF',
8+
/*
9+
defaults:
10+
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#enabledpreviewproviders
11+
*/
12+
'OC\Preview\BMP',
13+
// 'OC\Preview\GIF',
14+
// 'OC\Preview\JPEG',
15+
'OC\Preview\Krita',
16+
'OC\Preview\MarkDown',
17+
'OC\Preview\MP3',
18+
'OC\Preview\OpenDocument',
19+
// 'OC\Preview\PNG',
20+
'OC\Preview\TXT',
21+
'OC\Preview\XBitmap',
22+
),
23+
);

charts/nextcloud/files/defaultConfigs/reverse-proxy.config.php.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ $trustedProxies = getenv('TRUSTED_PROXIES');
2828
if ($trustedProxies) {
2929
$CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
3030
}
31+
32+
$forwardedForHeaders = getenv('FORWARDED_FOR_HEADERS');
33+
if ($forwardedForHeaders) {
34+
$CONFIG['forwarded_for_headers'] = array_filter(array_map('trim', explode(' ', $forwardedForHeaders)));
35+
}

0 commit comments

Comments
 (0)