From 42b219b9d7864011a9da7a83f7bb131efcfe3df9 Mon Sep 17 00:00:00 2001 From: James Denton Date: Mon, 25 Mar 2024 13:56:31 -0500 Subject: [PATCH] Support large uploads via Skyline A new override, `skyline_client_max_body_size`, has been introduced to support large image uploads via the Skyline dashboard. The default value of 1100M supports upstream Ubuntu and Rocky Linux images, but can be increased to support larger images or decreased to encourage the use of the CLI. Change-Id: I0fc079692980ccd24edabcea5382ff6ada693893 --- defaults/main.yml | 3 +++ ...support-large-image-uploads.yaml-1ac278e2a2cbb846.yaml | 8 ++++++++ templates/nginx.conf.j2 | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/support-large-image-uploads.yaml-1ac278e2a2cbb846.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 197670d..612aaeb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -109,3 +109,6 @@ skyline_services: ## Tunable overrides skyline_apiserver_init_overrides: {} skyline_skyline_yaml_overrides: {} + +# Set override for image upload size +skyline_client_max_body_size: 1100M diff --git a/releasenotes/notes/support-large-image-uploads.yaml-1ac278e2a2cbb846.yaml b/releasenotes/notes/support-large-image-uploads.yaml-1ac278e2a2cbb846.yaml new file mode 100644 index 0000000..14d8d5a --- /dev/null +++ b/releasenotes/notes/support-large-image-uploads.yaml-1ac278e2a2cbb846.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + A new override, `skyline_client_max_body_size`, has been introduced to + support large image uploads via the Skyline dashboard. The default value + of 1100M supports upstream Ubuntu and Rocky Linux images, but can be + increased to support larger images or decreased to encourage the use + of the CLI. diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index b2940dc..7ba1e3b 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -46,6 +46,9 @@ server { proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; +{% if 'glance' in _service %} + client_max_body_size {{ skyline_client_max_body_size }}; +{% endif %} } {% endif %} {% endfor %}