From fe869b97fdce09079e44bfca460bb1ab7d660aa6 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 1 Sep 2025 12:13:23 +0200 Subject: [PATCH] Fix missing cozy-lib.resources.flatten template Signed-off-by: Andrei Kvapil --- packages/library/cozy-lib/templates/_resources.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/library/cozy-lib/templates/_resources.tpl b/packages/library/cozy-lib/templates/_resources.tpl index ee0fb732..9c335e53 100644 --- a/packages/library/cozy-lib/templates/_resources.tpl +++ b/packages/library/cozy-lib/templates/_resources.tpl @@ -172,3 +172,15 @@ {{- $xmsMi := min (div $memoryLimitInt 4194304) (div $memoryRequestInt 1048576) }} {{- printf `-Xms%dm -Xmx%dm` $xmsMi $xmxMi }} {{- end }} + +{{- define "cozy-lib.resources.flatten" -}} +{{- $out := dict -}} +{{- $res := include "cozy-lib.resources.sanitize" . | fromYaml -}} +{{- range $section, $values := $res }} + {{- range $k, $v := $values }} + {{- $key := printf "%s.%s" $section $k }} + {{- $_ := set $out $key $v }} + {{- end }} +{{- end }} +{{- dict "resourceQuotas" $out | toYaml }} +{{- end }}