Skip to content

Commit

Permalink
Add block validator memory settings (#91)
Browse files Browse the repository at this point in the history
* Add block validator memory settings

* Update README and values.schema.json for modified charts

* Trigger CI

* Update _helpers.tpl

---------

Co-authored-by: a-thomas-22 <[email protected]>
  • Loading branch information
a-thomas-22 and a-thomas-22 authored Dec 19, 2024
1 parent 78efaf2 commit 85ff14c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/nitro/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ maintainers:

type: application

version: 0.6.20
version: 0.6.21

appVersion: "v3.2.1-d81324d"
2 changes: 2 additions & 0 deletions charts/nitro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ helm install xai offchainlabs/nitro -f values.yaml
| `env.nitro.goMemLimit.multiplier` | The multiplier of available memory to use for nitro | `0.9` |
| `env.resourceMgmtMemFreeLimit.enabled` | Enable nitro resource management | `false` |
| `env.resourceMgmtMemFreeLimit.multiplier` | The multiplier of available memory to use | `0.05` |
| `env.blockValidatorMemFreeLimit.enabled` | Enable block validator memory management | `false` |
| `env.blockValidatorMemFreeLimit.multiplier` | The multiplier of available memory to use | `0.05` |
| `persistence.enabled` | Enable persistence | `true` |
| `persistence.size` | Size of the persistent volume claim | `500Gi` |
| `persistence.storageClassName` | Storage class of the persistent volume claim | `nil` |
Expand Down
2 changes: 2 additions & 0 deletions charts/nitro/ci/sepolia-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ resources:
env:
resourceMgmtMemFreeLimit:
enabled: true
blockValidatorMemFreeLimit:
enabled: true

configmap:
data:
Expand Down
4 changes: 4 additions & 0 deletions charts/nitro/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ nitro args
- name: {{ $envPrefix }}_NODE_RESOURCE__MGMT_MEM__FREE__LIMIT
value: {{ printf "%dB" (int (mulf $valueMi ($.Values.env.resourceMgmtMemFreeLimit.multiplier | default 0.05) 1048576)) }}
{{- end }}
{{- if $.Values.env.blockValidatorMemFreeLimit.enabled }}
- name: {{ $envPrefix }}_NODE_BLOCK__VALIDATOR_MEMORY__FREE__LIMIT
value: {{ printf "%dB" (int (mulf $valueMi ($.Values.env.blockValidatorMemFreeLimit.multiplier | default 0.05) 1048576)) }}
{{- end }}
{{- end -}}
{{- end -}}

Expand Down
5 changes: 5 additions & 0 deletions charts/nitro/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ updateStrategy:
## @param env.nitro.goMemLimit.multiplier The multiplier of available memory to use for nitro
## @param env.resourceMgmtMemFreeLimit.enabled Enable nitro resource management
## @param env.resourceMgmtMemFreeLimit.multiplier The multiplier of available memory to use
## @param env.blockValidatorMemFreeLimit.enabled Enable block validator memory management
## @param env.blockValidatorMemFreeLimit.multiplier The multiplier of available memory to use
env:
splitvalidator:
goMemLimit:
Expand All @@ -61,6 +63,9 @@ env:
resourceMgmtMemFreeLimit:
enabled: false
multiplier: 0.05
blockValidatorMemFreeLimit:
enabled: false
multiplier: 0.05

## @param persistence.enabled Enable persistence
## @param persistence.size Size of the persistent volume claim
Expand Down

0 comments on commit 85ff14c

Please sign in to comment.