Skip to content

Commit 7ffd5b6

Browse files
committed
fix(storagebox): fix Garage layout capacity and setup Job reliability
Set layout capacity to 1073741824 (1 GiB) instead of 1. Garage v1.3.1 rejects capacity=1 as too small for its partition table. Also add -f to the layout apply curl call so errors are caught by set -e.
1 parent 33530cd commit 7ffd5b6

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

applications/storagebox/charts/storagebox/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: storagebox
33
description: A Helm chart for different storage options
44
type: application
5-
version: 0.26.7
5+
version: 0.26.8
66
appVersion: 1.0.0
77
icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIj48cmVjdCB4PSIyIiB5PSI2IiB3aWR0aD0iMjgiIGhlaWdodD0iMjIiIHJ4PSIzIiBmaWxsPSIjMjU2M2ViIi8+PHJlY3QgeD0iNSIgeT0iOSIgd2lkdGg9IjIyIiBoZWlnaHQ9IjUiIHJ4PSIxIiBmaWxsPSIjNjBhNWZhIi8+PHJlY3QgeD0iNSIgeT0iMTYiIHdpZHRoPSIyMiIgaGVpZ2h0PSI1IiByeD0iMSIgZmlsbD0iIzkzYzVmZCIvPjxyZWN0IHg9IjUiIHk9IjIzIiB3aWR0aD0iMjIiIGhlaWdodD0iMyIgcng9IjEiIGZpbGw9IiNiZmRiZmUiLz48Y2lyY2xlIGN4PSIyNCIgY3k9IjExLjUiIHI9IjEuNSIgZmlsbD0iIzIyYzU1ZSIvPjxjaXJjbGUgY3g9IjI0IiBjeT0iMTguNSIgcj0iMS41IiBmaWxsPSIjMjJjNTVlIi8+PC9zdmc+
88
dependencies:

applications/storagebox/charts/storagebox/templates/garage-setup-job.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ spec:
4444
- sh
4545
- -c
4646
- |
47-
set -ex
47+
set -e
4848
apk add --no-cache curl jq > /dev/null 2>&1
4949
5050
GARAGE_ADMIN="http://{{ .Release.Name }}-garage:3903"
@@ -74,15 +74,15 @@ spec:
7474
curl -sf -X POST \
7575
-H "Authorization: Bearer ${ADMIN_TOKEN}" \
7676
-H "Content-Type: application/json" \
77-
-d "[{\"id\": \"${NODE_ID}\", \"zone\": \"dc1\", \"capacity\": 1, \"tags\": [\"storagebox\"]}]" \
77+
-d "[{\"id\": \"${NODE_ID}\", \"zone\": \"dc1\", \"capacity\": 1073741824, \"tags\": [\"storagebox\"]}]" \
7878
"${GARAGE_ADMIN}/v1/layout"
7979
8080
echo "Applying layout..."
8181
LAYOUT_JSON=$(curl -s -H "Authorization: Bearer ${ADMIN_TOKEN}" "${GARAGE_ADMIN}/v1/layout")
8282
echo "Layout response: ${LAYOUT_JSON}"
8383
CURRENT_VERSION=$(echo "${LAYOUT_JSON}" | jq -r '.version')
8484
echo "Current version: ${CURRENT_VERSION}, applying version $((CURRENT_VERSION + 1))"
85-
curl -s -X POST \
85+
curl -sf -X POST \
8686
-H "Authorization: Bearer ${ADMIN_TOKEN}" \
8787
-H "Content-Type: application/json" \
8888
-d "{\"version\": $((CURRENT_VERSION + 1))}" \

applications/storagebox/kots/storagebox-chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
chart:
77
name: storagebox
8-
chartVersion: 0.26.7
8+
chartVersion: 0.26.8
99
helmUpgradeFlags:
1010
- --timeout
1111
- 10m0s

0 commit comments

Comments
 (0)