Skip to content

Commit 8954452

Browse files
committed
fix(charts): update values.yaml and job.yaml for chainId and security context
- Added chainId field to values.yaml for explicit configuration. - Updated comments in values.yaml for clarity and compatibility with helm-docs. - Adjusted job.yaml to ensure proper handling of chainId and security contexts. - Addressed YAML parse errors in job.yaml to maintain template integrity.
1 parent ad089d0 commit 8954452

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

charts/network/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ A Helm chart for a blockchain network on Kubernetes
2222
| Key | Type | Default | Description |
2323
|-----|------|---------|-------------|
2424
| extraInitContainers | list | `[]` | Additional init containers appended verbatim to each workload. |
25-
| global | object | `{"chainId":null,"networkNodes":{"faucetArtifactPrefix":"besu-faucet","genesisConfigMapName":"besu-genesis","podPrefix":"","serviceName":"","staticNodesConfigMapName":"besu-static-nodes"},"securityContexts":{"container":{},"pod":{}}}` | Global configuration shared across subcharts. |
26-
| global.chainId | int | `nil` | Chain ID applied when charts omit explicit overrides. |
25+
| global | object | `{"chainId":13456,"networkNodes":{"faucetArtifactPrefix":"besu-faucet","genesisConfigMapName":"besu-genesis","podPrefix":"","serviceName":"","staticNodesConfigMapName":"besu-static-nodes"},"securityContexts":{"container":{},"pod":{}}}` | Global configuration shared across subcharts. |
26+
| global.chainId | int | `13456` | Chain ID applied when charts omit explicit overrides. |
2727
| global.networkNodes | object | `{"faucetArtifactPrefix":"besu-faucet","genesisConfigMapName":"besu-genesis","podPrefix":"","serviceName":"","staticNodesConfigMapName":"besu-static-nodes"}` | Defaults consumed by Besu network node workloads. |
2828
| global.networkNodes.faucetArtifactPrefix | string | `"besu-faucet"` | Prefix used for faucet ConfigMaps and Secrets. |
2929
| global.networkNodes.genesisConfigMapName | string | `"besu-genesis"` | ConfigMap name storing the generated genesis.json artifact. |

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ spec:
7171
{{- $globalNodes := default (dict) (get $globalValues "networkNodes") }}
7272
{{- $localChainId := get $settingsValues "chainId" }}
7373
{{- $globalChainId := get $globalValues "chainId" }}
74-
{{- $localChainIdSet := not (kindIs "invalid" $localChainId) }}
75-
{{- $globalChainIdSet := not (kindIs "invalid" $globalChainId) }}
74+
{{- $localChainIdBlank := and (kindIs "string" $localChainId) (eq (trim $localChainId) "") }}
75+
{{- $globalChainIdBlank := and (kindIs "string" $globalChainId) (eq (trim $globalChainId) "") }}
76+
{{- $localChainIdSet := and (not (kindIs "invalid" $localChainId)) (not $localChainIdBlank) (not (empty $localChainId)) }}
77+
{{- $globalChainIdSet := and (not (kindIs "invalid" $globalChainId)) (not $globalChainIdBlank) (not (empty $globalChainId)) }}
7678
{{- $resolvedChainId := ternary $localChainId $globalChainId $localChainIdSet }}
7779
{{- $autoNames := dict "service" "besu-node" "podPrefix" "besu-node-validator" }}
7880
{{- with (index $.Subcharts "network-nodes") }}

charts/network/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ global:
1515
# -- (string) Prefix used for faucet ConfigMaps and Secrets.
1616
faucetArtifactPrefix: besu-faucet
1717
# -- (int) Chain ID applied when charts omit explicit overrides.
18-
chainId:
18+
chainId: 13456
1919
# -- (object) Shared pod- and container-level security contexts applied when subcharts omit explicit overrides.
2020
securityContexts:
2121
# -- (object) Pod security context inherited by subcharts when set.

0 commit comments

Comments
 (0)