diff --git a/dysnix/bsc/Chart.yaml b/dysnix/bsc/Chart.yaml index e5c8fbe0..0ae08f95 100644 --- a/dysnix/bsc/Chart.yaml +++ b/dysnix/bsc/Chart.yaml @@ -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 diff --git a/dysnix/bsc/templates/scripts/_check_node_readiness.tpl b/dysnix/bsc/templates/scripts/_check_node_readiness.tpl index 9553df9c..239cb6ae 100644 --- a/dysnix/bsc/templates/scripts/_check_node_readiness.tpl +++ b/dysnix/bsc/templates/scripts/_check_node_readiness.tpl @@ -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" } diff --git a/dysnix/bsc/templates/scripts/_sync_to_gcs.tpl b/dysnix/bsc/templates/scripts/_sync_to_gcs.tpl index 61ca604e..a6da3c97 100644 --- a/dysnix/bsc/templates/scripts/_sync_to_gcs.tpl +++ b/dysnix/bsc/templates/scripts/_sync_to_gcs.tpl @@ -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} diff --git a/dysnix/bsc/templates/statefulset.yaml b/dysnix/bsc/templates/statefulset.yaml index aebbd6d7..4e61067e 100644 --- a/dysnix/bsc/templates/statefulset.yaml +++ b/dysnix/bsc/templates/statefulset.yaml @@ -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 }} diff --git a/dysnix/bsc/values.yaml b/dysnix/bsc/values.yaml index b6215e1e..a82f9197 100644 --- a/dysnix/bsc/values.yaml +++ b/dysnix/bsc/values.yaml @@ -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: