From 1ad6bd6982bb3e327b88a0d2b10966b553d1f0c9 Mon Sep 17 00:00:00 2001 From: Nina Doschek Date: Wed, 19 Jul 2023 02:46:55 -0700 Subject: [PATCH] Allow configuration of proxy-body size for instances-ingress (#29) Define the proxy-body-size value for instances-ingress and allow to customize it via the values file. The proxy-body-size resembles the maximum allowed size of the client request body. (e.g. relevant for file-uploads in the Theia application) --- charts/theia.cloud/Chart.yaml | 2 +- .../theia.cloud/templates/instances-ingress-path-based.yaml | 1 + charts/theia.cloud/templates/instances-ingress.yaml | 1 + charts/theia.cloud/values.yaml | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/theia.cloud/Chart.yaml b/charts/theia.cloud/Chart.yaml index 5b3ce80..b459f04 100644 --- a/charts/theia.cloud/Chart.yaml +++ b/charts/theia.cloud/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.8.0 +version: 0.8.1-v001 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/theia.cloud/templates/instances-ingress-path-based.yaml b/charts/theia.cloud/templates/instances-ingress-path-based.yaml index faafa93..1d917a4 100644 --- a/charts/theia.cloud/templates/instances-ingress-path-based.yaml +++ b/charts/theia.cloud/templates/instances-ingress-path-based.yaml @@ -13,6 +13,7 @@ metadata: nginx.ingress.kubernetes.io/rewrite-target: /$2 nginx.ingress.kubernetes.io/configuration-snippet: | proxy_set_header 'X-Forwarded-Uri' $request_uri; + nginx.ingress.kubernetes.io/proxy-body-size: {{ tpl (.Values.ingress.proxyBodySize | toString) . }} spec: {{- if .Values.hosts.tls }} tls: diff --git a/charts/theia.cloud/templates/instances-ingress.yaml b/charts/theia.cloud/templates/instances-ingress.yaml index 119d59b..9f9312e 100644 --- a/charts/theia.cloud/templates/instances-ingress.yaml +++ b/charts/theia.cloud/templates/instances-ingress.yaml @@ -18,6 +18,7 @@ metadata: nginx.ingress.kubernetes.io/rewrite-target: /$2 nginx.ingress.kubernetes.io/configuration-snippet: | proxy_set_header 'X-Forwarded-Uri' $request_uri; + nginx.ingress.kubernetes.io/proxy-body-size: {{ tpl (.Values.ingress.proxyBodySize | toString) . }} spec: {{- if .Values.hosts.tls }} tls: diff --git a/charts/theia.cloud/values.yaml b/charts/theia.cloud/values.yaml index 5740d10..be4ca60 100644 --- a/charts/theia.cloud/values.yaml +++ b/charts/theia.cloud/values.yaml @@ -212,6 +212,10 @@ ingress: # common-name theiaCloudCommonName: false + # Sets the maximum allowed size of the client request body inside the application (e.g. file uploads in Theia). + # Defaults to 1m. Setting size to 0 disables checking of client request body size. + proxyBodySize: 1m + operatorrole: name: operator-api-access