3 SPDX-License-Identifier: APACHE-2.0
6 {{/* vim: set filetype=mustache: */}}
9 Return a resource request/limit object based on a given preset.
10 These presets are for basic testing and not meant to be used in production
11 {{ include "common.resources.preset" (dict "type" "nano") -}}
13 {{- define "common.resources.preset" -}}
14 {{/* The limits are the requests increased by 50% (except ephemeral-storage)*/}}
17 "requests" (dict "cpu" "100m" "memory" "128Mi" "ephemeral-storage" "50Mi")
18 "limits" (dict "cpu" "150m" "memory" "192Mi" "ephemeral-storage" "1024Mi")
21 "requests" (dict "cpu" "250m" "memory" "256Mi" "ephemeral-storage" "50Mi")
22 "limits" (dict "cpu" "375m" "memory" "384Mi" "ephemeral-storage" "1024Mi")
25 "requests" (dict "cpu" "500m" "memory" "512Mi" "ephemeral-storage" "50Mi")
26 "limits" (dict "cpu" "750m" "memory" "768Mi" "ephemeral-storage" "1024Mi")
29 "requests" (dict "cpu" "500m" "memory" "1024Mi" "ephemeral-storage" "50Mi")
30 "limits" (dict "cpu" "750m" "memory" "1536Mi" "ephemeral-storage" "1024Mi")
33 "requests" (dict "cpu" "1.0" "memory" "2048Mi" "ephemeral-storage" "50Mi")
34 "limits" (dict "cpu" "1.5" "memory" "3072Mi" "ephemeral-storage" "1024Mi")
37 "requests" (dict "cpu" "2.0" "memory" "4096Mi" "ephemeral-storage" "50Mi")
38 "limits" (dict "cpu" "3.0" "memory" "6144Mi" "ephemeral-storage" "1024Mi")
41 "requests" (dict "cpu" "4.0" "memory" "8192Mi" "ephemeral-storage" "50Mi")
42 "limits" (dict "cpu" "6.0" "memory" "12288Mi" "ephemeral-storage" "1024Mi")
45 {{- if hasKey $presets .type -}}
46 {{- index $presets .type | toYaml -}}
48 {{- printf "ERROR: Preset key '%s' invalid. Allowed values are %s" .type (join "," (keys $presets)) | fail -}}