Added INSTANCE_PREFIX to S3 project hash to avoid url clashes between clusters in same EC2 region

This commit is contained in:
Martin Westergaard Lassen 2016-08-05 22:00:34 +01:00 committed by mwl
parent ab0b937c2e
commit c73a47f599

View File

@ -606,9 +606,9 @@ function upload-server-tars() {
local project_hash=
local key=$(aws configure get aws_access_key_id)
if which md5 > /dev/null 2>&1; then
project_hash=$(md5 -q -s "${USER} ${key}")
project_hash=$(md5 -q -s "${USER} ${key} ${INSTANCE_PREFIX}")
else
project_hash=$(echo -n "${USER} ${key}" | md5sum | awk '{ print $1 }')
project_hash=$(echo -n "${USER} ${key} ${INSTANCE_PREFIX}" | md5sum | awk '{ print $1 }')
fi
AWS_S3_BUCKET="kubernetes-staging-${project_hash}"
fi