Skip to content

Commit

Permalink
feat(overprovisioner): Added support for custom requests (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeon2 authored Mar 12, 2024
1 parent ee2e6b1 commit c1f4c5a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions charts/overprovisioner/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

## [UNRELEASED]

### Changed

- Updating `spec.template.spec.containers.resources` to be object map to support multiple resource types.


## [v0.3.0] - 2024-01-17

### Changed
Expand Down
3 changes: 1 addition & 2 deletions charts/overprovisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ helm upgrade --install overprovisioner stevehipwell/overprovisioner --version 0.
| capacity.auto.nodesPerReplica | int | `1` | Number of pause pod replicas to create per cluster node; if `capacity.mode` is `auto`. |
| capacity.fixed.replicas | int | `1` | Number of pause pod replicas to create; if `capacity.mode` is `fixed`. |
| capacity.mode | string | `"fixed"` | Capacity mode to use; one of `fixed` or `auto`. If `auto` is used, a [cluster-proportional-autoscaler](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler) deployment will be used to scale the pause pods |
| capacity.resources.cpu | string | `"10m"` | CPU resource requests and limits for the pause pods. |
| capacity.resources.memory | string | `"16Mi"` | Memory resource requests and limits for the pause pods. |
| capacity.resources | object | See _values.yaml_ | Map of resources to provision. |
| commonLabels | object | `{}` | Labels to add to all chart resources. |
| fullnameOverride | string | `nil` | Override the full name of the chart. |
| imagePullSecrets | list | `[]` | Image pull secrets. |
Expand Down
10 changes: 6 additions & 4 deletions charts/overprovisioner/templates/pause/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ spec:
imagePullPolicy: {{ .Values.pause.image.pullPolicy }}
resources:
requests:
cpu: {{ .Values.capacity.resources.cpu }}
memory: {{ .Values.capacity.resources.memory }}
{{- with .Values.capacity.resources }}
{{- toYaml . | nindent 14 }}
{{- end }}
limits:
cpu: {{ .Values.capacity.resources.cpu }}
memory: {{ .Values.capacity.resources.memory }}
{{- with .Values.capacity.resources }}
{{- toYaml . | nindent 14 }}
{{- end }}
{{- with .Values.pause.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/overprovisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ capacity:
# -- Maximum number of pause pod replicas to create; if `capacity.mode` is `auto`.
maxReplicas: 1

# -- (object) Map of resources to provision.
# @default -- See _values.yaml_
resources:
# -- CPU resource requests and limits for the pause pods.
cpu: 10m
# -- Memory resource requests and limits for the pause pods.
memory: 16Mi

priorityClass:
Expand Down

0 comments on commit c1f4c5a

Please sign in to comment.