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

[bsc] various minor fixes #308

Merged
merged 1 commit into from
Jul 12, 2024
Merged
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
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
Loading