owncloud / ocis-charts

:chart_with_upwards_trend: Helm Charts for ownCloud's OCIS
https://owncloud.dev/ocis/deployment/kubernetes/
Apache License 2.0
47 stars 26 forks source link

add maintenance page #339

Open wkloucek opened 1 year ago

wkloucek commented 1 year ago

We could use a Helm pre-upgrade hook to change the ingress to respond with a static maintenance page. This maintenance page would respond to all api routes. It would need respond with 503 Service Unavailable or a similar status code, so that the clients don't error.

During the Helm post-upgrade hook, we would then need to switch back to the regular ingress.

One challenge would be to not interrupt requests when going into maintenance mode. This can be challenging especially for slow / big uploads (=long running requests).

wkloucek commented 1 year ago

@d7oc do you have an opinion on this? Currently, while services are restarting (eg. when having DeploymentStrategy Recreate) the behaviour of oCIS is undefined (eg. 401 / 500 errors can appear). Therefore I would prefer having a maintenance page.

d7oc commented 1 year ago

To me it sounds like we should fix the undefined state. There should be no point in time when a user sees different errors. The liveness and readiness checks should ensure that once a user reaches a service it should be up and running. After that there should be only 503 from the service itself as long as there are no pod detected as live and ready. For that I would go with a solution like the one here https://devops.stackexchange.com/a/13637 and make the ingress return a specific page in case of 503.

wkloucek commented 4 months ago

Discussion on Web: https://github.com/owncloud/web/issues/10260