Repository navigation
fix: buggy kubernetes demo setup - #4
Conversation
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
027436f to
862fdc0
Compare
|
Can this be merged? I was going to create my own PR that did the exact same thing before I noticed one was already open. |
meisam-ui
left a comment
There was a problem hiding this comment.
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.
| --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;" | ||
|
|
There was a problem hiding this comment.
One leftover in this file: line 219 (“Limitations”) still lists onlyoffice as a demo password. Please change it to eurooffice too.
| 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 |
There was a problem hiding this comment.
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.
| 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" }} |
There was a problem hiding this comment.
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:
- It's a path segment, not a display name: it must match the directory the image was built with (
euro-office). The chart already usesproduct.namefor the same paths (allmountPath: /var/www/{{ .Values.product.name }}/...). A separateproduct.companyNamelets the two diverge and silently breaks the paths. Suggest deriving it fromproduct.nameand dropping the new value fromvalues.yaml. - The value is unquoted: e.g.
--set product.companyName="Euro Office: Test"fails with a YAML parse error.| quotefixes that, and| defaultisn't needed sincevalues.yamlsets it.
| COMPANY_NAME: {{ .Values.product.companyName | default "euro-office" }} | |
| COMPANY_NAME: {{ .Values.product.name | quote }} |
There was a problem hiding this comment.
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:
- Unpinned schema.
ds.sqlScripts.branchName(_helpers.tpl) hardcodesmaster, which is no longer maintained (default branch ismain). The SQL would be downloaded at runtime from a moving ref, independent ofimages.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. helm uninstallwould drop tables. With a working URL, this hook really runsremovetbl.sql(DROP TABLEdoc_changes,task_result,doc_callbacks), anddelete.job.enabledistrueby default. The hook will be disabled by default.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| ## This is a service variable. You don't need to change it | ||
| product: | ||
| name: euro-office | ||
| companyName: euro-office |
There was a problem hiding this comment.
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).
| companyName: euro-office |
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>
|
PR is fixed according to the reviewer comment. |
This PR fixes issues with the kubernetes demo (and future standard) setup.
Issues resolved: