Skip to content

Commit

Permalink
Adds min and max to LimitRange
Browse files Browse the repository at this point in the history
  • Loading branch information
emoreth committed Aug 22, 2024
1 parent 6c76649 commit b06bfd4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
10 changes: 10 additions & 0 deletions chart/templates/limitrange.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ spec:
{{- range $key, $val := .Values.policies.limitRange.defaultRequest }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- if .Values.policies.limitRange.min }}
{{- range $key, $val := .Values.policies.limitRange.min }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- if .Values.policies.limitRange.max }}
{{- range $key, $val := .Values.policies.limitRange.max }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
type: Container
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,14 @@
"type": "object",
"description": "DefaultRequest are the default request options for the limit range"
},
"max": {
"type": "object",
"description": "Min are the min limits for the limit range"
},
"min": {
"type": "object",
"description": "Max are the max limits for the limit range"
},
"annotations": {
"additionalProperties": {
"type": "string"
Expand Down
6 changes: 5 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,11 @@ policies:
ephemeral-storage: 3Gi
memory: 128Mi
cpu: 100m

# Max are the max limits for the limit range
max: {}
# Min are the min limits for the limit range
min: {}

# NetworkPolicy specifies network policy options.
networkPolicy:
# Enabled defines if the network policy should be deployed by vCluster.
Expand Down

0 comments on commit b06bfd4

Please sign in to comment.