This repository has been archived on 2024-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2022-06-23 13:54:37 +02:00

17 lines
474 B
YAML

{{- range .Values.namespaces }}
{{- if and .quota .overcommit }}
---
apiVersion: v1
kind: ResourceQuota
metadata:
name: {{ .name }}
spec:
hard:
limits.cpu: {{ .quota.cpu | mul .overcommit.cpu }}
limits.memory: {{ .quota.memory | regexFind "[1-9]+" | mul .overcommit.memory }}{{ .quota.memory | regexFind "[a-zA-Z]+" }}
requests.cpu: {{ .quota.cpu }}
requests.memory: {{ .quota.memory }}
requests.storage: {{ .quota.storage }}
{{- end }}
{{- end -}}