Skip to content

Commit

Permalink
update k8s deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-EA committed Sep 12, 2023
1 parent c9b8ef6 commit 2a99d02
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
25 changes: 8 additions & 17 deletions helm/bsc/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,9 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/sh", "-c"]
args:
- geth
--config /data/config.toml
--datadir /data
--ws
--ws.port 8545
--ws.addr 0.0.0.0
--http.addr 0.0.0.0
--http.port 8545
--http.corsdomain "*"
--allow-insecure-unlock
--mine
--password /data/password.txt
-unlock "0x$(cat /data/keystore/* | sed -n 's/.*"address":"\([^"]*\).*/\1/p')"
--rpc.allow-unprotected-txs
--gcmode archive
--syncmode=full
--nodekey /data/nodekey
- geth init --datadir /data /data/genesis.json;
geth --config /data/config.toml --datadir /data --ws --ws.port 8545 --ws.addr 0.0.0.0 --http.addr 0.0.0.0 --http.port 8545 --http.corsdomain "*" --allow-insecure-unlock --mine --password /data/password.txt -unlock "0x$(cat /data/keystore/* | sed -n 's/.*"address":"\([^"]*\).*/\1/p')" --rpc.allow-unprotected-txs --gcmode archive --syncmode=full --nodekey /data/nodekey;

ports:
- name: http
containerPort: 8545
Expand All @@ -84,6 +70,11 @@ spec:
- name: config-volume
mountPath: /data/config.toml
subPath: config.toml
readOnly: false
- name: config-volume
mountPath: /data/genesis.json
subPath: genesis.json
readOnly: false
- name: nodekey-volume
mountPath: /data/nodekey
subPath: nodekey
Expand Down
2 changes: 1 addition & 1 deletion helm/bsc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

image:
repository: ghcr.io/bnb-chain/bsc
pullPolicy: IfNotPresent
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

Expand Down
3 changes: 2 additions & 1 deletion setup_bsc_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ function prepare_k8s_config() {

kubectl delete configmap config${i} -n bsc
kubectl create configmap config${i} -n bsc \
--from-file ${workspace}/.local/bsc/clusterNetwork/node${i}/config.toml
--from-file ${workspace}/.local/bsc/clusterNetwork/node${i}/config.toml \
--from-file ${workspace}/genesis/genesis.json

kubectl delete configmap nodekey${i} -n bsc
kubectl create configmap nodekey${i} -n bsc \
Expand Down

0 comments on commit 2a99d02

Please sign in to comment.