File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ if [ "$EPHEMERAL_ONLY" = false ]; then
163163 # Extract numeric value from DISK_SIZE (remove 'GB' suffix)
164164 DISK_SIZE_GB=" ${DISK_SIZE% GB} "
165165 fi
166+
167+ # Calculate disk persistence size in Gi (K8s will not accept size in GB)
168+ PV_SIZE=$(( DISK_SIZE_GB * 0 .93 ))
166169else
167170 echo " ℹ Using ephemeral storage only (no persistent disk)."
168171fi
@@ -188,7 +191,7 @@ GCLOUD_CMD=(
188191# Build metadata string
189192METADATA=" ssh-keys=ubuntu:$SSH_KEY "
190193if [ " $EPHEMERAL_ONLY " = false ]; then
191- METADATA=" ${METADATA} ,persistent-disk -size=${DISK_SIZE_GB} GB "
194+ METADATA=" ${METADATA} ,persistent-volume -size=${PV_SIZE} Gi "
192195fi
193196
194197# Add combined metadata
Original file line number Diff line number Diff line change @@ -37,10 +37,7 @@ runcmd:
3737 HOST_IP=$(curl -s ifconfig.me)
3838
3939 # Get persistence size from metadata if available
40- PERSISTENT_DISK_SIZE=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/persistent-disk-size" -H "Metadata-Flavor: Google" 2>/dev/null || echo "20GB")
41- # Remove ' GB' suffix for Ansible variable and deduct 10GB for system use
42- GALAXY_PERSISTENCE_SIZE=$(( ${PERSISTENT_DISK_SIZE%GB} - 10 ))
43-
40+ PV_SIZE=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/persistent-volume-size" -H "Metadata-Flavor: Google" 2>/dev/null || echo "20Gi")
4441
4542 mkdir -p /tmp/ansible-inventory
4643 cat > /tmp/ansible-inventory/localhost << EOF
@@ -52,8 +49,8 @@ runcmd:
5249 rke2_token="defaultSecret12345"
5350 rke2_additional_sans=["${HOST_IP}"]
5451 rke2_debug=true
55- nfs_size="${PERSISTENT_DISK_SIZE }"
56- galaxy_persistence_size="${GALAXY_PERSISTENCE_SIZE}GB "
52+ nfs_size="${PV_SIZE }"
53+ galaxy_persistence_size="${PV_SIZE} "
5754 galaxy_db_password="gxy-db-password"
5855 galaxy_user="dev@galaxyproject.org"
5956 EOF
You can’t perform that action at this time.
0 commit comments