Skip to content
Snippets Groups Projects
Verified Commit 5c09eea6 authored by David Hoese's avatar David Hoese
Browse files

Fix bash syntax in MinIO deployment

parent 755c7508
No related branches found
No related tags found
No related merge requests found
...@@ -146,17 +146,17 @@ deploy_prod_minio: ...@@ -146,17 +146,17 @@ deploy_prod_minio:
- kubeconfig=$(basename $kubekorner_k3s_config) - kubeconfig=$(basename $kubekorner_k3s_config)
# get password from any previous installation # get password from any previous installation
- auth_sec="geosphere-minio-minio" - auth_sec="geosphere-minio-minio"
- sec_info=$(kubectl --kubeconfig $kubeconfig get secret --namespace geosphere-test geosphere-minio-minio || echo "") - sec_info=$(kubectl --kubeconfig $kubeconfig get secret --namespace $ns $auth_sec || echo "")
- echo $sec_info - echo "$sec_info"
# if we've installed this once then reuse the existing secret # if we've installed this once then reuse the existing secret
# otherwise force the chart to generate random values for accessKey and secretKey # otherwise force the chart to generate random values for accessKey and secretKey
# by setting them to false # by setting them to false
- if [ "$sec_info" != "" ]; then - if [ "$sec_info" != "" ]; then
ak=$(kubectl --kubeconfig $kubeconfig get secret --namespace $ns $auth_sec -o jsonpath="{.data.accessKey}" | base64 -d); ak=$(kubectl --kubeconfig $kubeconfig get secret --namespace "$ns" "$auth_sec" -o jsonpath="{.data.accessKey}" | base64 -d);
sk=$(kubectl --kubeconfig $kubeconfig get secret --namespace $ns $auth_sec -o jsonpath="{.data.secretKey}" | base64 -d); sk=$(kubectl --kubeconfig $kubeconfig get secret --namespace "$ns" "$auth_sec" -o jsonpath="{.data.secretKey}" | base64 -d);
EXTRA_ARGS="--set existingSecret=$auth_sec --set accessKey=$ak --set secretKey=$sk"; EXTRA_ARGS="--set existingSecret=$auth_sec --set accessKey=$ak --set secretKey=$sk";
else else
EXTRA_ARGS="--set accessKey=false --set secretKey=false" EXTRA_ARGS="--set accessKey=false --set secretKey=false";
fi fi
- echo $EXTRA_ARGS - echo $EXTRA_ARGS
- helm upgrade -v 2 --install --kubeconfig $kubeconfig -f production/values-geosphere-minio.yaml $EXTRA_ARGS --namespace $ns geosphere-minio stable/minio - helm upgrade -v 2 --install --kubeconfig $kubeconfig -f production/values-geosphere-minio.yaml $EXTRA_ARGS --namespace $ns geosphere-minio stable/minio
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment