{{- define "hrbox.resources" -}} {{- $r := index .ctx.Values.resources .component -}} {{- if $r }} resources: {{- with $r.requests }} requests: {{- with .cpu }} cpu: {{ . | quote }} {{- end }} {{- with .memory }} memory: {{ . | quote }} {{- end }} {{- with .ephemeralStorage }} ephemeral-storage: {{ . | quote }} {{- end }} {{- end }} {{- with $r.limits }} limits: {{- with .cpu }} cpu: {{ . | quote }} {{- end }} {{- with .memory }} memory: {{ . | quote }} {{- end }} {{- with .ephemeralStorage }} ephemeral-storage: {{ . | quote }} {{- end }} {{- end }} {{- end }} {{- end -}}