diff --git a/k8s/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml b/k8s/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml index e7df272a8..86d1a943c 100644 --- a/k8s/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml +++ b/k8s/charts/seaweedfs/templates/shared/post-install-bucket-hook.yaml @@ -92,6 +92,7 @@ spec: - "/bin/sh" - "-ec" - | + set -o pipefail wait_for_service() { local url=$1 local max_attempts=60 # 5 minutes total (5s * 60) @@ -117,8 +118,7 @@ spec: wait_for_service "http://$WEED_CLUSTER_SW_MASTER{{ .Values.master.readinessProbe.httpGet.path }}" wait_for_service "http://$WEED_CLUSTER_SW_FILER{{ .Values.filer.readinessProbe.httpGet.path }}" {{- end }} - set -o pipefail - {{- range $createBuckets }} + {{- range $createBuckets }} {{- $bucketName := .name }} {{- $bucketLock := or .lock .objectLock .withLock }} bucket_list=$(/bin/echo 's3.bucket.list' | /usr/bin/weed shell) || { echo "Error listing s3 buckets"; exit 1; }