-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(charts): geth flags #1957
fix(charts): geth flags #1957
Conversation
charts/evm-rollup/values.yaml
Outdated
@@ -174,13 +174,13 @@ config: | |||
- name: history.state | |||
value: "{{- if .Values.config.geth.archiveNode -}} 0 {{- else -}} 540000 {{- end }}" | |||
- name: metrics | |||
condition: .Values.metrics.enabled | |||
condition: "{{- if .Values.metrics.enabled -}} true {{- else -}} false {{- end }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on testing I believe this works fine
condition : "{{ .Values.metrics.enabled }}"
{{- if hasKey $arg "condition" }} | ||
{{- if eq (tpl $arg.condition $) "true" }} | ||
- --{{ $arg.name }}{{ if $arg.value }}={{ tpl $arg.value $ }}{{ end }} | ||
{{- end }} | ||
{{- else }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably keep this duplication to a minimum, can do same in the exec script?
If there is no condition set or the condition evaluates to true
{{- if hasKey $arg "condition" }} | |
{{- if eq (tpl $arg.condition $) "true" }} | |
- --{{ $arg.name }}{{ if $arg.value }}={{ tpl $arg.value $ }}{{ end }} | |
{{- end }} | |
{{- else }} | |
{{- $noCondition := not (hasKey $arg "condition") }} | |
{{- if or ($noCondition) (eq (tpl $arg.condition $) "true") }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated both statefulset and exec script with the new format, tested with and without metrics enabled using:
helm template my-chart ./charts/evm-stack -f ./dev/values/rollup/dev.yaml
a2f0cc9
to
c24fcde
Compare
14b8aa8
to
81c3147
Compare
Summary
changes to how flags condition is evaluated and used.
Background
Our current evm-rollup charts has a bug, the condition which helps configuring geth flags is not being evaluated and always acts as
true
. This PR changes the condition templating.Changes
true
if the condition exists.Testing
helm template my-chart ./charts/evm-stack -f ./dev/values/rollup/dev.yaml
Changelogs
No updates required.