Skip to content
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

add ability to: 1 add annotations to headless service; 2 define ports… #86

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.18
version: 0.6.19

appVersion: "v3.2.1-d81324d"
8 changes: 4 additions & 4 deletions charts/nitro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Option | Description | Default
`blocks-reexecutor.enable` | enables re-execution of a range of blocks against historic state | None
`blocks-reexecutor.end-block` | uint last block number of the block range for re-execution | None
`blocks-reexecutor.mode` | string mode to run the blocks-reexecutor on. Valid modes full and random. full - execute all the blocks in the given range. random - execute a random sample range of blocks with in a given range | `random`
`blocks-reexecutor.room` | int number of threads to parallelize blocks re-execution | `10`
`blocks-reexecutor.room` | int number of threads to parallelize blocks re-execution | `12`
`blocks-reexecutor.start-block` | uint first block number of the block range for re-execution | None
`chain.dev-wallet.account` | string account to use | `is first account in keystore`
`chain.dev-wallet.only-create-key` | if true, creates new key then exits | None
Expand Down Expand Up @@ -382,7 +382,7 @@ Option | Description | Default
`init.latest-base` | string base url used when searching for the latest | `https://snapshot.arbitrum.foundation/`
`init.prune` | string pruning for a given use: "full" for full nodes serving RPC requests, or "validator" for validators | None
`init.prune-bloom-size` | uint the amount of memory in megabytes to use for the pruning bloom filter (higher values prune better) | `2048`
`init.prune-threads` | int the number of threads to use when pruning | `10`
`init.prune-threads` | int the number of threads to use when pruning | `12`
`init.prune-trie-clean-cache` | int amount of memory in megabytes to cache unchanged state trie nodes with when traversing state database during pruning | `600`
`init.rebuild-local-wasm` | string rebuild local wasm database on boot if needed (otherwise-will be done lazily). Three modes are supported "auto"- (enabled by default) if any previous rebuilding attempt was successful then rebuilding is disabled else continues to rebuild, "force"- force rebuilding which would commence rebuilding despite the status of previous attempts, "false"- do not rebuild on startup (default "auto") | None
`init.recreate-missing-state-from` | uint block number to start recreating missing states from (0 = disabled) | None
Expand Down Expand Up @@ -472,7 +472,7 @@ Option | Description | Default
`node.block-validator.forward-blocks` | uint prepare entries for up to that many blocks ahead of validation (stores batch-copy per block) | `128`
`node.block-validator.memory-free-limit` | string minimum free-memory limit after reaching which the blockvalidator pauses validation. Enabled by default as 1GB, to disable provide empty string | `default`
`node.block-validator.pending-upgrade-module-root` | string pending upgrade wasm module root to additionally validate (hash, 'latest' or empty) | `latest`
`node.block-validator.prerecorded-blocks` | uint record that many blocks ahead of validation (larger footprint) | `20`
`node.block-validator.prerecorded-blocks` | uint record that many blocks ahead of validation (larger footprint) | `24`
`node.block-validator.recording-iter-limit` | uint limit on block recordings sent per iteration | `20`
`node.block-validator.redis-validation-client-config.create-streams` | create redis streams if it does not exist | `true`
`node.block-validator.redis-validation-client-config.name` | string validation client name | `redis validation client`
Expand Down Expand Up @@ -721,7 +721,7 @@ Option | Description | Default
`persistent.pebble.experimental.wal-bytes-per-sync` | int number of bytes to write to a write-ahead log (WAL) before calling Sync on it in the background | None
`persistent.pebble.experimental.wal-dir` | string absolute path of directory to store write-ahead logs (WALs) in. If empty, WALs will be stored in the same directory as sstables | None
`persistent.pebble.experimental.wal-min-sync-interval` | int minimum duration in microseconds between syncs of the WAL. If WAL syncs are requested faster than this interval, they will be artificially delayed. | None
`persistent.pebble.max-concurrent-compactions` | int maximum number of concurrent compactions | `10`
`persistent.pebble.max-concurrent-compactions` | int maximum number of concurrent compactions | `12`
`pprof` | enable pprof | None
`pprof-cfg.addr` | string pprof server address | `127.0.0.1`
`pprof-cfg.port` | int pprof server port | `6071`
Expand Down
18 changes: 9 additions & 9 deletions charts/nitro/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -109,35 +109,35 @@ Currently primarily used for stateless validator configuration

{{- /* Check if auto config processing is enabled */ -}}
{{- if .Values.enableAutoConfigProcessing -}}

{{- /* Check if the validator is enabled */ -}}
{{- if .Values.validator.enabled -}}

{{- /* Initialize an empty list to hold deployment configurations */ -}}
{{- $deployments := list -}}

{{- /* Get the full name for the deployment using the included nitro.fullname template */ -}}
{{- $fullName := include "nitro.fullname" . -}}

{{- /* Retrieve the port number from the validator's configuration */ -}}
{{- $port := int .Values.validator.splitvalidator.global.configmap.data.auth.port -}}

{{- /* Iterate over each deployment in the validator splitvalidator deployments */ -}}
{{- range .Values.validator.splitvalidator.deployments -}}

{{- /* Construct the URL for the websocket connection */ -}}
{{- $url := printf "ws://%s-val-%s:%d" $fullName .name $port -}}

{{- /* Create a deployment configuration dictionary with jwtsecret and URL */ -}}
{{- $deployment := dict "jwtsecret" "/secrets/jwtsecret" "url" $url -}}

{{- /* Append the deployment configuration to the deployments list */ -}}
{{- $deployments = append $deployments $deployment -}}
{{- end -}}

{{- /* Create the validation server config list in the configmap */ -}}
{{- $valconfig := dict "configmap" (dict "data" (dict "node" (dict "block-validator" (dict "validation-server-configs-list" (toJson $deployments | replace "\\" "")))) ) -}}

{{- /* Merge the new validation config into the original values */ -}}
{{- $values = merge $values $valconfig -}}
{{- end -}}
Expand Down
43 changes: 43 additions & 0 deletions charts/nitro/templates/headlessservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "nitro.fullname" . }}-headless
{{- if .Values.headlessservice.annotations }}
annotations:
{{- toYaml .Values.headlessservice.annotations | nindent 4 }}
{{- end }}
labels:
{{- include "nitro.labels" . | nindent 4 }}
spec:
Expand All @@ -13,5 +17,44 @@ spec:
selector:
{{- include "nitro.selectorLabels" . | nindent 4 }}
publishNotReadyAddresses: {{ .Values.headlessservice.publishNotReadyAddresses }}
ports:
{{- if and .Values.configmap.data.http .Values.configmap.data.http.port }}
- port: {{ index .Values.configmap.data.http.port }}
targetPort: http-rpc
protocol: TCP
name: http-rpc
{{- end }}
{{- if and .Values.configmap.data.ws .Values.configmap.data.ws.port }}
- port: {{ index .Values.configmap.data.ws.port }}
targetPort: ws
protocol: TCP
name: ws
{{- end }}
{{- if and .Values.configmap.data.node .Values.configmap.data.node.feed .Values.configmap.data.node.feed.output .Values.configmap.data.node.feed.output.port }}
- port: {{ .Values.configmap.data.node.feed.output.port }}
targetPort: feed
protocol: TCP
name: feed
{{- end }}
{{- if .Values.auth.enabled }}
- port: {{ .Values.auth.port }}
targetPort: {{ .Values.auth.port }}
protocol: TCP
name: auth
{{- end }}
{{- if .Values.configmap.data.metrics }}
- port: {{ index .Values "configmap" "data" "metrics-server" "port" }}
targetPort: metrics
protocol: TCP
name: metrics
{{- end }}
{{- range .Values.extraPorts }}
{{- if .serviceEnabled | default true }}
- name: {{ .name }}
port: {{ .servicePort | default .port }}
targetPort: {{ .port }}
protocol: {{ .protocol | default "TCP" }}
{{- end }}
{{- end }}
{{- end }}

1 change: 1 addition & 0 deletions charts/nitro/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ perReplicaService:
headlessservice:
enabled: true
publishNotReadyAddresses: true
annotations: {}

## @param jwtSecret.enabled Enable a jwt secret for use with the stateless validator
## @param jwtSecret.value Value of the jwt secret for use with the stateless validator
Expand Down
Loading