Skip to content

Commit

Permalink
Merge pull request #308 from dysnix/bsc-minor-fixes
Browse files Browse the repository at this point in the history
[bsc] various minor fixes
  • Loading branch information
voron authored Jul 12, 2024
2 parents f268a50 + 38f96b2 commit 0604276
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dysnix/bsc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: bsc
description: Binance Smart Chain chart for Kubernetes
version: 0.6.43
appVersion: 1.3.13
version: 0.6.44
appVersion: 1.4.10

keywords:
- geth
Expand Down
3 changes: 3 additions & 0 deletions dysnix/bsc/templates/scripts/_check_node_readiness.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ function get_local_block {

# Retrieving latest block timestamp of a local bsc node
function get_local_timestamp {
# TIMESTAMP_HEX=$(curl -s -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' http://localhost:8575|jq -r .result.timestamp)
# bash-only
# print -v TIMESTAMP "%d" $TIMESTAMP_HEX
geth --config=/config/config.toml --datadir={{ .Values.bsc.base_path }} attach $local_node_endpoint --exec "eth.getBlock(eth.blockNumber).timestamp"
}

Expand Down
2 changes: 0 additions & 2 deletions dysnix/bsc/templates/scripts/_sync_to_gcs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,11 @@ ${S5CMD} cp updating "s3://${UPDATING_URL}"
# sync is recursive by default, thus we need to exclude ancient data here
time ${S5CMD} --stat --log error sync --delete ${EXCLUDE_ANCIENT} "${CHAINDATA_DIR}/" "s3://${STATE_DST}/" &
STATE_CP_PID=$!
{{- if not .Values.bsc.pruneancient }}
time nice ${S5CMD} --stat --log error sync --delete --part-size 200 --concurrency 2 ${EXCLUDE_STATE} "${CHAINDATA_DIR}/ancient/" "s3://${ANCIENT_DST}/" &
ANCIENT_CP_PID=$!
# Wait for each specified child process and return its termination status
# errors are "handled" by "set -e"
wait ${ANCIENT_CP_PID}
{{- end }}
wait ${STATE_CP_PID}


Expand Down
4 changes: 4 additions & 0 deletions dysnix/bsc/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ spec:
env:
{{- toYaml .Values.metricsExtra.env | nindent 10 }}
{{- end }}
{{- with .Values.metricsExtra.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 10 }}
{{- end }}
ports:
- containerPort: {{ .Values.metricsExtra.port }}
name: {{ .Values.metricsExtra.portName }}
Expand Down
10 changes: 10 additions & 0 deletions dysnix/bsc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,16 @@ metricsExtra:
value: "8575"
- name: LISTENER_PORT
value: "9369"
livenessProbe:
httpGet:
path: /health
port: 9369
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 2


prometheus:
rules:
Expand Down

0 comments on commit 0604276

Please sign in to comment.