diff --git a/charts/taraxa-node/Chart.yaml b/charts/taraxa-node/Chart.yaml index 71c559c11b..5e3058df41 100644 --- a/charts/taraxa-node/Chart.yaml +++ b/charts/taraxa-node/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "1.0" description: Kubernetes helm chart for Taraxa blockchain full node implementation. name: taraxa-node -version: 0.3.13 +version: 0.3.14 keywords: - blockchain - taraxa diff --git a/charts/taraxa-node/templates/consensus-node-configmap.yaml b/charts/taraxa-node/templates/consensus-node-configmap.yaml index ba7b05621f..c0715dd1b2 100644 --- a/charts/taraxa-node/templates/consensus-node-configmap.yaml +++ b/charts/taraxa-node/templates/consensus-node-configmap.yaml @@ -167,6 +167,12 @@ data: {{- end }} {{- end }} + {{ if .Values.config.snapshots.enabled }} + cat $CONFIG_PATH | jq '.db_config.db_max_snapshots = 1' | jq '.db_config.db_snapshot_each_n_pbft_block = 10000' > $CONFIG_PATH.tmp && mv $CONFIG_PATH.tmp $CONFIG_PATH + {{- else }} + cat $CONFIG_PATH | jq '.db_config.db_max_snapshots = 0' | jq '.db_config.db_snapshot_each_n_pbft_block = 0' > $CONFIG_PATH.tmp && mv $CONFIG_PATH.tmp $CONFIG_PATH + {{- end }} + echo "***** $CONFIG_PATH *****" cat $CONFIG_PATH echo "***** $CONFIG_PATH *****" diff --git a/charts/taraxa-node/templates/consensus-node-light-configmap.yaml b/charts/taraxa-node/templates/consensus-node-light-configmap.yaml index 7d4adc594c..29d480ac96 100644 --- a/charts/taraxa-node/templates/consensus-node-light-configmap.yaml +++ b/charts/taraxa-node/templates/consensus-node-light-configmap.yaml @@ -167,6 +167,12 @@ data: {{- end }} {{- end }} + {{ if .Values.config.snapshots.enabled }} + cat $CONFIG_PATH | jq '.db_config.db_max_snapshots = 1' | jq '.db_config.db_snapshot_each_n_pbft_block = 10000' > $CONFIG_PATH.tmp && mv $CONFIG_PATH.tmp $CONFIG_PATH + {{- else }} + cat $CONFIG_PATH | jq '.db_config.db_max_snapshots = 0' | jq '.db_config.db_snapshot_each_n_pbft_block = 0' > $CONFIG_PATH.tmp && mv $CONFIG_PATH.tmp $CONFIG_PATH + {{- end }} + echo "***** $CONFIG_PATH *****" cat $CONFIG_PATH echo "***** $CONFIG_PATH *****" diff --git a/charts/taraxa-node/templates/taraxa-node-configmap.yaml b/charts/taraxa-node/templates/taraxa-node-configmap.yaml index e7713f0329..a4a5b7751a 100644 --- a/charts/taraxa-node/templates/taraxa-node-configmap.yaml +++ b/charts/taraxa-node/templates/taraxa-node-configmap.yaml @@ -154,6 +154,12 @@ data: {{- end }} {{- end }} + {{ if .Values.config.snapshots.enabled }} + cat $CONFIG_PATH | jq '.db_config.db_max_snapshots = 1' | jq '.db_config.db_snapshot_each_n_pbft_block = 10000' > $CONFIG_PATH.tmp && mv $CONFIG_PATH.tmp $CONFIG_PATH + {{- else }} + cat $CONFIG_PATH | jq '.db_config.db_max_snapshots = 0' | jq '.db_config.db_snapshot_each_n_pbft_block = 0' > $CONFIG_PATH.tmp && mv $CONFIG_PATH.tmp $CONFIG_PATH + {{- end }} + echo "***** $CONFIG_PATH *****" cat $CONFIG_PATH echo "***** $CONFIG_PATH *****" diff --git a/charts/taraxa-node/values.yaml b/charts/taraxa-node/values.yaml index 6d1fcd19ed..15eaf9f15b 100644 --- a/charts/taraxa-node/values.yaml +++ b/charts/taraxa-node/values.yaml @@ -20,6 +20,8 @@ config: # 100 for default helm test network: "100" extraArgs: [] + snapshots: + enabled: true # Default keys, VRFs and address for kube testing node: