From 5469aca2211728b09aac826e1dd2a6ba8beafa8a Mon Sep 17 00:00:00 2001 From: sdimovv <36302090+sdimovv@users.noreply.github.com> Date: Sat, 18 Nov 2023 19:37:31 +0000 Subject: [PATCH] feat(nextcloud): Add new onlyoffice config options (#14698) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # Adds additional config options for onlyoffice. With the current setup, the connection may not work out of the box, since Nextcloud and OnlyOffice will try to talk to each other using their public FQDNs. In this case, the user will have to configure the internal FQDNs manually from Nextcloud UI. **⚙️ Type of change** - [X] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Checked if templating works as I don't have access to the new image ``` helm template -n ix-nextcloud nextcloud . ``` **📃 Notes:** Container changes: https://github.com/truecharts/containers/pull/35386 **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [X] ⚠️ My changes generate no new warnings - [X] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [X] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: sdimovv <36302090+sdimovv@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/stable/nextcloud/Chart.yaml | 2 +- charts/stable/nextcloud/questions.yaml | 19 ++++++++++++++++++- .../stable/nextcloud/templates/_configmap.tpl | 3 +++ charts/stable/nextcloud/values.yaml | 2 ++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/charts/stable/nextcloud/Chart.yaml b/charts/stable/nextcloud/Chart.yaml index d06e5a55ca37..8372066d901b 100644 --- a/charts/stable/nextcloud/Chart.yaml +++ b/charts/stable/nextcloud/Chart.yaml @@ -29,7 +29,7 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm type: application -version: 22.1.17 +version: 22.2.0 annotations: truecharts.org/category: cloud truecharts.org/SCALE-support: "true" diff --git a/charts/stable/nextcloud/questions.yaml b/charts/stable/nextcloud/questions.yaml index 756b3ebcde9b..fd4730490cb9 100644 --- a/charts/stable/nextcloud/questions.yaml +++ b/charts/stable/nextcloud/questions.yaml @@ -456,11 +456,28 @@ questions: show_subquestions_if: true subquestions: - variable: url - label: URL + label: Public URL + description: | + The public FQDN and port of the OnlyOffice Document Server + schema: + type: string + required: true + default: "" + - variable: internal_url + label: Internal URL + description: | + The internal FQDN and port of the OnlyOffice Document Server schema: type: string required: true default: "" + - variable: verify_ssl + label: Verify SSL (Advanced) + description: | + Verify SSL when connecting to OnlyOffice Document Server + schema: + type: boolean + default: true - variable: jwt label: JWT schema: diff --git a/charts/stable/nextcloud/templates/_configmap.tpl b/charts/stable/nextcloud/templates/_configmap.tpl index 5a6a3e9f10bb..07f07dc809b3 100644 --- a/charts/stable/nextcloud/templates/_configmap.tpl +++ b/charts/stable/nextcloud/templates/_configmap.tpl @@ -184,6 +184,9 @@ nextcloud-config: NX_ONLYOFFICE: {{ .Values.nextcloud.onlyoffice.enabled | quote }} {{- if .Values.nextcloud.onlyoffice.enabled }} NX_ONLYOFFICE_URL: {{ .Values.nextcloud.onlyoffice.url | quote }} + NX_ONLYOFFICE_INTERNAL_URL: {{ .Values.nextcloud.onlyoffice.internal_url | quote }} + NX_ONLYOFFICE_VERIFY_SSL: {{ .Values.nextcloud.onlyoffice.verify_ssl | quote }} + NX_ONLYOFFICE_NEXTCLOUD_INTERNAL_URL: {{ printf "http://%v:%v" $fullname .Values.service.main.ports.main.port }} NX_ONLYOFFICE_JWT: {{ .Values.nextcloud.onlyoffice.jwt | quote }} NX_ONLYOFFICE_JWT_HEADER: {{ .Values.nextcloud.onlyoffice.jwt_header | quote }} {{- end }} diff --git a/charts/stable/nextcloud/values.yaml b/charts/stable/nextcloud/values.yaml index 7af9bb8f54ea..4f5c66043d01 100644 --- a/charts/stable/nextcloud/values.yaml +++ b/charts/stable/nextcloud/values.yaml @@ -112,6 +112,8 @@ nextcloud: # Only add the OnlyOffice settings enabled: false url: "" + internal_url: "" + verify_ssl: true jwt: "" jwt_header: Authorization # PHP settings