Fix missing cozy-lib.resources.flatten template

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil
2025-09-01 12:13:23 +02:00
parent 33691c2d3a
commit fe869b97fd

View File

@@ -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 }}