SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
helm: compare PVC sizes numerically in the volume resize hook (#11575)
Oliver Rahnerc9ade3f9fdfc
diff --git a/k8s/charts/seaweedfs/templates/shared/_helpers.tpl b/k8s/charts/seaweedfs/templates/shared/_helpers.tplindex 86ee839d1c..63812f0915 100644--- a/k8s/charts/seaweedfs/templates/shared/_helpers.tpl+++ b/k8s/charts/seaweedfs/templates/shared/_helpers.tpl@@ -504,8 +504,9 @@ true{{- $pvcName := printf "%s-%s-%s-%d" $dir.name $seaweedfsName $volumeName $e }}{{- $currentPVC := (lookup "v1" "PersistentVolumeClaim" $.Release.Namespace $pvcName) }}{{- if $currentPVC }}-{{- $oldSize := include "seaweedfs.resource-quantity" $currentPVC.spec.resources.requests.storage }}-{{- $newSize := include "seaweedfs.resource-quantity" $desiredSize }}+{{- /* include returns a string such as "6.442450944e+10"; convert back to a number, or gt compares lexically */}}+{{- $oldSize := include "seaweedfs.resource-quantity" $currentPVC.spec.resources.requests.storage | float64 }}+{{- $newSize := include "seaweedfs.resource-quantity" $desiredSize | float64 }}{{- if gt $newSize $oldSize }}{{- $commands = append $commands (printf "kubectl patch pvc %s-%s-%s-%d -p '{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"%s\"}}}}'" $dir.name $seaweedfsName $volumeName $e $desiredSize) }}{{- end }}