Skip to content

fix: buggy kubernetes demo setup - #4

Merged
meisam-ui merged 6 commits into
mainfrom
fix/kubernetessetup
Nov 27, 2026
Merged

meisam-ui merged 6 commits into
mainfrom
fix/kubernetessetup

Conversation

@rikled

@rikled rikled commented Aug 13, 2026

Copy link
Copy Markdown
Member

This PR fixes issues with the kubernetes demo (and future standard) setup.

Issues resolved:

  • company name was not set, so directory resolution was wrong
  • database inital setup scripts are no longer pulled from non-existent onlyoffice repository

Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
@nvanlaerebeke

Copy link
Copy Markdown
Contributor

Can this be merged?
Right now it's not possible to set up euro office using the helm chart due to this issue.

I was going to create my own PR that did the exact same thing before I noticed one was already open.

@meisam-ui meisam-ui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repointing the DB hook scripts to Euro-Office/server and setting COMPANY_NAME fixes the broken Helm install (Euro-Office/DocumentServer#290). Non-blocking notes: the dashboard URLs reference master while this repo uses main, the ds.sqlScripts.branchName ref needs to exist in Euro-Office/server, and the redundant | default in the ConfigMap duplicates values.yaml. Longer term, the hooks should ship or pin the SQL scripts rather than fetch from a mutable ref at install time. Details are inline.

Comment thread demo/Readme.md
--image=postgres:16 -- \
psql "postgresql://onlyoffice:onlyoffice@pg-postgresql:5432/onlyoffice" -c "SELECT 1;"
psql "postgresql://eurooffice:eurooffice@pg-postgresql:5432/eurooffice" -c "SELECT 1;"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One leftover in this file: line 219 (“Limitations”) still lists onlyoffice as a demo password. Please change it to eurooffice too.

Comment thread templates/configmaps/dashboard.yaml Outdated
Comment on lines +28 to +29
wget https://raw.githubusercontent.com/Euro-Office/Kubernetes-Docs/master/sources/metrics/documentserver-statsd-exporter.json -O /scripts/dashboard-documentserver.json
wget https://raw.githubusercontent.com/Euro-Office/Kubernetes-Docs/master/sources/metrics/kubernetes-cluster-resourses.json -O /scripts/dashboard-cluster-resourses.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master is the old, unmaintained branch of this repo; the default branch is main. The files are identical today, but master won't get future changes. Suggest using main.

Suggested change
wget https://raw.githubusercontent.com/Euro-Office/Kubernetes-Docs/master/sources/metrics/documentserver-statsd-exporter.json -O /scripts/dashboard-documentserver.json
wget https://raw.githubusercontent.com/Euro-Office/Kubernetes-Docs/master/sources/metrics/kubernetes-cluster-resourses.json -O /scripts/dashboard-cluster-resourses.json
wget https://raw.githubusercontent.com/Euro-Office/Kubernetes-Docs/main/sources/metrics/documentserver-statsd-exporter.json -O /scripts/dashboard-documentserver.json
wget https://raw.githubusercontent.com/Euro-Office/Kubernetes-Docs/main/sources/metrics/kubernetes-cluster-resourses.json -O /scripts/dashboard-cluster-resourses.json

{{- end }}
data:
APPLICATION_NAME: {{ .Values.product.name }}
COMPANY_NAME: {{ .Values.product.companyName | default "euro-office" }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding COMPANY_NAME is needed: the orchestrated image entrypoints (build/scripts/orchestrated/*-entrypoint.sh in Euro-Office/DocumentServer) build paths like /var/www/$COMPANY_NAME/documentserver, and the image itself only sets COMPANY_NAME_LOW.

Two points:

  1. It's a path segment, not a display name: it must match the directory the image was built with (euro-office). The chart already uses product.name for the same paths (all mountPath: /var/www/{{ .Values.product.name }}/...). A separate product.companyName lets the two diverge and silently breaks the paths. Suggest deriving it from product.name and dropping the new value from values.yaml.
  2. The value is unquoted: e.g. --set product.companyName="Euro Office: Test" fails with a YAML parse error. | quote fixes that, and | default isn't needed since values.yaml sets it.
Suggested change
COMPANY_NAME: {{ .Values.product.companyName | default "euro-office" }}
COMPANY_NAME: {{ .Values.product.name | quote }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking this down: the old ONLYOFFICE/server/master/schema/... URLs return 404, so these hooks silently ran nothing.

Please drop this change from the PR. It will be fixed in a separate PR, because repointing to Euro-Office/server/master creates two new problems here:

  1. Unpinned schema. ds.sqlScripts.branchName (_helpers.tpl) hardcodes master, which is no longer maintained (default branch is main). The SQL would be downloaded at runtime from a moving ref, independent of images.tag. The planned fix is to ship the schema in the utils image (as the upstream ONLYOFFICE chart does since 6.1.0) and remove the runtime download.
  2. helm uninstall would drop tables. With a working URL, this hook really runs removetbl.sql (DROP TABLE doc_changes, task_result, doc_callbacks), and delete.job.enabled is true by default. The hook will be disabled by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this change from the PR; it will be fixed in a separate PR.

The 404 diagnosis is correct (a fresh install currently creates no tables), but master on Euro-Office/server is no longer maintained (default branch is main), and ds.sqlScripts.branchName hardcodes it, so the schema would come from a moving ref, independent of images.tag. The planned fix ships the schema in the utils image (as the upstream ONLYOFFICE chart does since 6.1.0), so the install job no longer downloads anything at runtime.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this change from the PR; it will be fixed in a separate PR.

Besides the unpinned master ref (see the comment on pre-install.yaml), a working URL makes this hook destructive: every helm rollback would run removetbl.sql (DROP TABLE doc_changes, task_result, doc_callbacks) before createdb.sql. Until now the 404 made it a silent no-op. rollback.job.enabled is true by default; the planned fix disables it by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this change from the PR; it will be fixed in a separate PR.

Besides the unpinned master ref (see the comment on pre-install.yaml), a working URL makes this hook destructive: every helm upgrade would run removetbl.sql (DROP TABLE doc_changes, task_result, doc_callbacks) before createdb.sql. Until now the 404 made it a silent no-op.

The hook first calls /internal/cluster/inactive and waits for open documents to be saved, but that wait uses editorStat.getShutdownCount, which with editorDataMemory.js only counts documents on the pod that received the request. With more than one docservice replica, tables can be dropped while other pods are still saving. upgrade.job.enabled is true by default; the planned fix disables it by default.

Comment thread values.yaml Outdated
## This is a service variable. You don't need to change it
product:
name: euro-office
companyName: euro-office

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this value. COMPANY_NAME is used by the image entrypoints as a path segment (/var/www/$COMPANY_NAME/...), so it must equal the directory the image was built with, the same value as product.name, which the chart already uses for all mount paths. A second setting only allows the two to diverge (see the comment on documentserver.yaml, which derives COMPANY_NAME from product.name).

Suggested change
companyName: euro-office

meisam-ui and others added 5 commits November 27, 2026 14:48
Signed-off-by: mheidari <meisam.heidari@strato.de>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: mheidari <meisam.heidari@strato.de>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: mheidari <meisam.heidari@strato.de>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: mheidari <meisam.heidari@strato.de>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: mheidari <meisam.heidari@strato.de>
@meisam-ui

Copy link
Copy Markdown
Contributor

PR is fixed according to the reviewer comment.

@meisam-ui
meisam-ui self-requested a review November 27, 2026 14:00

@meisam-ui meisam-ui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix are done.

@meisam-ui
meisam-ui merged commit d2217e9 into main Nov 27, 2026
6 checks passed
@meisam-ui
meisam-ui deleted the fix/kubernetessetup branch November 27, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not working on Docker with helm

3 participants