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

[juno-node] Fetch Juno version from API. #148

Merged
merged 3 commits into from
Sep 26, 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
2 changes: 1 addition & 1 deletion charts/juno-node/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: juno-chart
version: 0.1.5
version: 0.1.6
appVersion: "1"
description: A Helm chart for deploying Juno service
maintainers:
Expand Down
8 changes: 5 additions & 3 deletions charts/juno-node/templates/juno-data-backup-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,12 @@ data:
- |
apk add --no-cache curl &&
apk add --no-cache jq &&
latestBlockNumber=$(curl --location '{{ .Values.backupJunoDataJob.junoFreeEndpoint }}/{{ .Values.backupJunoDataJob.network }}-juno' --header 'Content-Type: application/json' --data '{ "jsonrpc": "2.0","method": "starknet_blockNumber", "id": 1}' | jq '.result') &&
latestBlockNumber=$(curl --location '{{ .Values.backupJunoDataJob.junoFreeEndpoint }}/{{ .Values.backupJunoDataJob.network }}-juno' --header 'Content-Type: application/json' --data '{ "jsonrpc": "2.0","method": "starknet_blockNumber", "id": 1}' | jq '.result') &&
echo "latestBlockNumber is $latestBlockNumber" &&
mv /mnt/juno-tar-backup/juno_{{ .Values.backupJunoDataJob.network }}_{{ .Values.deployment.imagetag }}*.tar /mnt/juno-tar-backup/juno_{{ .Values.backupJunoDataJob.network }}_{{ .Values.deployment.imagetag }}_$latestBlockNumber.tar &&
echo "/mnt/juno-tar-backup/juno_{{ .Values.backupJunoDataJob.network }}_{{ .Values.deployment.imagetag }}_$latestBlockNumber.tar" &&
junoVersion=$(curl --location '{{ .Values.backupJunoDataJob.junoFreeEndpoint }}/{{ .Values.backupJunoDataJob.network }}-juno' --header 'Content-Type: application/json' --data '{ "jsonrpc": "2.0","method": "juno_version", "id": 1}' | jq -r '.result') &&
echo "junoVersion is $junoVersion " &&
mv /mnt/juno-tar-backup/juno_{{ .Values.backupJunoDataJob.network }}_*.tar /mnt/juno-tar-backup/juno_{{ .Values.backupJunoDataJob.network }}_${junoVersion}_${latestBlockNumber}.tar &&
echo "/mnt/juno-tar-backup/juno_{{ .Values.backupJunoDataJob.network }}_${junoVersion}_${latestBlockNumber}.tar" &&
rclone copy /mnt/juno-tar-backup/*.tar R2:/{{ .Values.backupJunoDataJob.bucketName }}/{{ .Values.backupJunoDataJob.network }}
volumeMounts:
- name: {{ .Values.deployment.namespace }}-rclone-config
Expand Down
2 changes: 1 addition & 1 deletion charts/juno-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ secret:

### Back up juno data and upload to R2 cloud
backupJunoDataJob:
enabled: true
enabled: false
dataSource: "juno-sepolia-pv-ssd-juno-sepolia-0"
backupSchedule: "0 3 * * *"
cleanupSchedule: "0 10 * * *"
Expand Down
Loading