22
33set -exu
44
5+ . " $( dirname $0 ) /common.sh"
6+
57# create a separate namespace for metadata
68kubectl create namespace metadata
79
@@ -19,18 +21,27 @@ helm install -n metadata \
1921 --set metadata.sproxyd.persistentVolume.storageClass=' ' \
2022 s3c cloudserver/
2123
22- # wait for the repds to be ready
24+ # wait for the repds to be created
2325kubectl -n metadata rollout status --watch --timeout=300s statefulset/s3c-metadata-repd
26+ # wait for all repd pods to start serving admin API ports
27+ wait_for_all_pods_behind_services metadata-repd metadata " 91*" 60
2428
2529# current chart uses an old version of bucketd that has issues reconnecting to the repd
2630# when bucketd is started first. Restarting bucketd after repd is ready.
2731kubectl -n metadata rollout restart deployment/s3c-metadata-bucketd
32+ # wait for the bucketd pods to be created
2833kubectl -n metadata rollout status --watch --timeout=300s deploy/s3c-metadata-bucketd
34+ # wait for all bucketd pods to start serving port 9000
35+ wait_for_all_pods_behind_services metadata-bucketd metadata 9000 60
2936
30- # manually add "s3c.local" to the rest endpoint list as it is not configurable in the chart
37+ # manually add "s3c.local" to the rest endpoints list as it's not configurable in the chart
3138current_config=$( kubectl get configmap/s3c-cloudserver-config-json -n metadata -o jsonpath=' {.data.config\.json}' )
3239updated_config=$( echo " $current_config " | jq ' .restEndpoints["s3c.local"] = "us-east-1"' )
3340kubectl patch configmap/s3c-cloudserver-config-json -n metadata --type=' merge' -p=" $( jq -n --arg v " $updated_config " ' {"data": {"config.json": $v}}' ) "
3441
3542# restarting cloudserver to take the new configmap changes into account
3643kubectl -n metadata rollout restart deployment/s3c-cloudserver
44+ # wait for the cloudserver pods to be created
45+ kubectl -n metadata rollout status --watch --timeout=300s deployment/s3c-cloudserver
46+ # wait for the cloudserver pods to start serving port 8000
47+ wait_for_all_pods_behind_services cloudserver metadata 8000 60
0 commit comments