From 97cdc022c63784b57ddfe5883d0883d05038f779 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 24 Jul 2024 06:57:00 +0200 Subject: [PATCH] thumbnails hardening (#570) --- charts/ocis/docs/values-desc-table.adoc | 6 ++++++ charts/ocis/docs/values.adoc.yaml | 3 +++ charts/ocis/templates/thumbnails/deployment.yaml | 3 +++ charts/ocis/values.yaml | 3 +++ 4 files changed, 15 insertions(+) diff --git a/charts/ocis/docs/values-desc-table.adoc b/charts/ocis/docs/values-desc-table.adoc index f30b19a4f..b524f7aad 100644 --- a/charts/ocis/docs/values-desc-table.adoc +++ b/charts/ocis/docs/values-desc-table.adoc @@ -4068,6 +4068,12 @@ a| [subs=-attributes] a| [subs=-attributes] `""` | Per-service priorityClassName configuration. Overrides the default setting from `priorityClassName` if set. +| services.thumbnails.quota.maxConcurrencyRequests +a| [subs=-attributes] ++int+ +a| [subs=-attributes] +`0` +| Number of maximum concurrent thumbnail requests. Default is 0 which is unlimited. | services.thumbnails.resources a| [subs=-attributes] +object+ diff --git a/charts/ocis/docs/values.adoc.yaml b/charts/ocis/docs/values.adoc.yaml index 2a901c06d..6135c73ce 100644 --- a/charts/ocis/docs/values.adoc.yaml +++ b/charts/ocis/docs/values.adoc.yaml @@ -1913,6 +1913,9 @@ services: # -- THUMBNAILS service. # @default -- see detailed service configuration options below thumbnails: + quota: + # -- Number of maximum concurrent thumbnail requests. Default is 0 which is unlimited. + maxConcurrencyRequests: 0 # -- Persistence settings. # @default -- see detailed persistence configuration options below persistence: diff --git a/charts/ocis/templates/thumbnails/deployment.yaml b/charts/ocis/templates/thumbnails/deployment.yaml index ce43f00dd..06f0e49e2 100644 --- a/charts/ocis/templates/thumbnails/deployment.yaml +++ b/charts/ocis/templates/thumbnails/deployment.yaml @@ -66,6 +66,9 @@ spec: - name: THUMBNAILS_DATA_ENDPOINT value: http://{{ .appName }}:9186/thumbnails/data + - name: THUMBNAILS_MAX_CONCURRENT_REQUESTS + value: {{ .Values.services.thumbnails.quota.maxConcurrencyRequests | quote }} + - name: THUMBNAILS_WEBDAVSOURCE_INSECURE value: {{ .Values.insecure.ocisHttpApiInsecure | quote }} diff --git a/charts/ocis/values.yaml b/charts/ocis/values.yaml index 867d57295..ab3b26285 100644 --- a/charts/ocis/values.yaml +++ b/charts/ocis/values.yaml @@ -1912,6 +1912,9 @@ services: # -- THUMBNAILS service. # @default -- see detailed service configuration options below thumbnails: + quota: + # -- Number of maximum concurrent thumbnail requests. Default is 0 which is unlimited. + maxConcurrencyRequests: 0 # -- Persistence settings. # @default -- see detailed persistence configuration options below persistence: