Skip to content

Commit b8e2837

Browse files
committed
fix(charts): update README and values.yaml for network-bootstrapper configuration
- Revised the README.md to enhance clarity and consistency in documenting configuration values for the network-bootstrapper, including detailed descriptions for `clusterDomain`, `defaultStaticNodeDiscoveryPort`, and `fullnameOverride`. - Updated the structure of configuration values in values.yaml to align with best practices, ensuring accurate documentation for users. - Improved overall integrity and readability of the configuration files, addressing YAML parsing errors and enhancing user guidance.
1 parent 4e87a41 commit b8e2837

5 files changed

Lines changed: 87 additions & 15 deletions

File tree

charts/network/charts/network-bootstrapper/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ A Helm chart for Kubernetes
1515
| Key | Type | Default | Description |
1616
|-----|------|---------|-------------|
1717
| affinity | object | `{}` | |
18-
| clusterDomain | string | `"svc.cluster.local"` | Kubernetes DNS suffix appended to generated static node hostnames when unset by the CLI. |
19-
| defaultStaticNodeDiscoveryPort | int | `30303` | Default UDP discovery port used in generated enode URIs when no override is provided. |
20-
| defaultStaticNodePort | int | `30303` | Default TCP P2P port used in generated enode URIs when no override is provided. |
2118
| fullnameOverride | string | `"bootstrapper"` | Override for the fully qualified resource name generated by helpers. |
2219
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy controlling when Kubernetes fetches updated image layers. |
2320
| image.repository | string | `"ghcr.io/settlemint/network-bootstrapper"` | OCI registry path hosting the network bootstrapper image. |
@@ -37,8 +34,11 @@ A Helm chart for Kubernetes
3734
| serviceAccount.name | string | `""` | Existing ServiceAccount name to reuse instead of creating one. |
3835
| settings.allocations | string | `nil` | Path to a JSON allocations file providing pre-funded accounts. |
3936
| settings.chainId | int | `nil` | Explicit chain ID to encode into the genesis file. |
37+
| settings.clusterDomain | string | `"svc.cluster.local"` | Kubernetes DNS suffix appended to generated static node hostnames when unset by the CLI. |
4038
| settings.consensus | string | `nil` | Consensus engine to configure (QBFT or IBFTv2). |
4139
| settings.contractSizeLimit | int | `nil` | Maximum smart-contract bytecode size accepted by the EVM. |
40+
| settings.defaultStaticNodeDiscoveryPort | int | `30303` | Default UDP discovery port used in generated enode URIs when no override is provided. |
41+
| settings.defaultStaticNodePort | int | `30303` | Default TCP P2P port used in generated enode URIs when no override is provided. |
4242
| settings.evmStackSize | int | `nil` | Maximum EVM stack size permitted for contract execution. |
4343
| settings.gasLimit | int | `nil` | Genesis block gas limit expressed as a decimal number. |
4444
| settings.gasPrice | int | `nil` | Base gas price in wei applied across the network. |

charts/network/charts/network-bootstrapper/templates/job.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ spec:
3939
imagePullPolicy: {{ .Values.image.pullPolicy }}
4040
args:
4141
- generate
42-
{{- $clusterDomain := default "svc.cluster.local" .Values.clusterDomain }}
43-
{{- $defaultStaticPort := default 30303 .Values.defaultStaticNodePort }}
44-
{{- $defaultStaticDiscovery := default 30303 .Values.defaultStaticNodeDiscoveryPort }}
42+
{{- $clusterDomain := default "svc.cluster.local" .Values.settings.clusterDomain }}
43+
{{- $defaultStaticPort := default 30303 .Values.settings.defaultStaticNodePort }}
44+
{{- $defaultStaticDiscovery := default 30303 .Values.settings.defaultStaticNodeDiscoveryPort }}
4545
{{- $resolvedStaticDomain := default $clusterDomain .Values.settings.staticNodeDomain }}
4646
{{- $resolvedStaticPort := default $defaultStaticPort .Values.settings.staticNodePort }}
4747
{{- $resolvedStaticDiscovery := default $defaultStaticDiscovery .Values.settings.staticNodeDiscoveryPort }}

charts/network/charts/network-bootstrapper/values.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,14 @@ tolerations: []
8585
# Affinity and anti-affinity rules influencing pod placement.
8686
affinity: {}
8787

88-
# -- (string) Kubernetes DNS suffix appended to generated static node hostnames when unset by the CLI.
89-
clusterDomain: svc.cluster.local
90-
91-
# -- (int) Default TCP P2P port used in generated enode URIs when no override is provided.
92-
defaultStaticNodePort: 30303
93-
94-
# -- (int) Default UDP discovery port used in generated enode URIs when no override is provided.
95-
defaultStaticNodeDiscoveryPort: 30303
96-
9788
# Settings passed to the network-bootstrapper CLI executed by the job.
9889
settings:
90+
# -- (string) Kubernetes DNS suffix appended to generated static node hostnames when unset by the CLI.
91+
clusterDomain: svc.cluster.local
92+
# -- (int) Default TCP P2P port used in generated enode URIs when no override is provided.
93+
defaultStaticNodePort: 30303
94+
# -- (int) Default UDP discovery port used in generated enode URIs when no override is provided.
95+
defaultStaticNodeDiscoveryPort: 30303
9996
# -- (int) Number of validator identities to generate (default 4).
10097
validators:
10198
# -- (string) DNS suffix appended to generated static node hostnames.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{- $namespace := .Release.Namespace -}}
2+
{{- $fullname := include "nodes.fullname" . -}}
3+
Thank you for deploying the {{ .Chart.Name }} chart!
4+
5+
This release creates two StatefulSets (validators and RPC nodes) plus matching Services to expose Besu endpoints.
6+
7+
Pods and Services
8+
-----------------
9+
List the pods created by this release:
10+
11+
kubectl -n {{ $namespace }} get pods -l app.kubernetes.io/instance={{ .Release.Name }}
12+
13+
Validators publish peer-to-peer interfaces via `svc/{{ $fullname }}` while RPC nodes expose JSON-RPC via `svc/{{ $fullname }}-rpc`.
14+
15+
Accessing RPC Endpoints
16+
-----------------------
17+
Port-forward the RPC service to access JSON-RPC locally:
18+
19+
kubectl -n {{ $namespace }} port-forward svc/{{ $fullname }}-rpc 8545:{{ .Values.service.ports.rpc }}
20+
21+
Optional: forward WebSockets or GraphQL by selecting the corresponding service port names (`ws`, `graphql`).
22+
23+
Observability
24+
-------------
25+
Metrics are available on the `metrics` port of each service. Example scrape using `curl`:
26+
27+
kubectl -n {{ $namespace }} port-forward svc/{{ $fullname }} 9545:{{ .Values.service.ports.metrics }}
28+
curl -s http://127.0.0.1:9545/metrics
29+
30+
When finished, cancel any port-forward sessions with Ctrl+C.

charts/network/templates/NOTES.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{{- $namespace := .Release.Namespace -}}
2+
{{- $release := .Release.Name -}}
3+
Thanks for installing the {{ .Chart.Name }} chart!
4+
5+
This umbrella release wires together:
6+
- the `network-bootstrapper` job that generates genesis artefacts and static node definitions, and
7+
- the `network-nodes` StatefulSets that launch Besu validator and RPC nodes.
8+
9+
Bootstrapper Workflow
10+
---------------------
11+
1. Wait for the bootstrapper job to finish producing outputs:
12+
13+
kubectl -n {{ $namespace }} wait --for=condition=complete job -l app.kubernetes.io/name=network-bootstrapper,app.kubernetes.io/instance={{ $release }}
14+
15+
2. Stream the job logs to review the generated configuration or troubleshoot failures:
16+
17+
kubectl -n {{ $namespace }} logs job -l app.kubernetes.io/name=network-bootstrapper,app.kubernetes.io/instance={{ $release }}
18+
19+
3. When `settings.outputType` is `kubernetes`, fetch the generated artefacts:
20+
21+
kubectl -n {{ $namespace }} get configmaps -l app.kubernetes.io/name=network-bootstrapper,app.kubernetes.io/instance={{ $release }}
22+
kubectl -n {{ $namespace }} get secrets -l app.kubernetes.io/name=network-bootstrapper,app.kubernetes.io/instance={{ $release }}
23+
24+
Besu Node Operations
25+
--------------------
26+
1. Confirm the validator and RPC pods are healthy:
27+
28+
kubectl -n {{ $namespace }} get pods -l app.kubernetes.io/name=besu-node,app.kubernetes.io/instance={{ $release }}
29+
30+
2. Port-forward the shared validator service (P2P) or the RPC service for local access (Ctrl+C to stop):
31+
32+
kubectl -n {{ $namespace }} port-forward svc/besu-node 8545:8545
33+
kubectl -n {{ $namespace }} port-forward svc/besu-node-rpc 8545:8545
34+
35+
3. Expose metrics locally for scraping or ad-hoc inspection:
36+
37+
kubectl -n {{ $namespace }} port-forward svc/besu-node 9545:9545
38+
39+
Next Steps
40+
----------
41+
- Inspect all resources created by this release:
42+
43+
kubectl -n {{ $namespace }} get all -l app.kubernetes.io/instance={{ $release }}
44+
45+
- Apply network policies, ingress controllers, or secrets required by your environment before opening the network to external peers.

0 commit comments

Comments
 (0)