mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Added INSTANCE_PREFIX to S3 project hash to avoid url clashes between clusters in same EC2 region
This commit is contained in:
		
				
					committed by
					
						
						mwl
					
				
			
			
				
	
			
			
			
						parent
						
							ab0b937c2e
						
					
				
				
					commit
					c73a47f599
				
			@@ -606,9 +606,9 @@ function upload-server-tars() {
 | 
				
			|||||||
      local project_hash=
 | 
					      local project_hash=
 | 
				
			||||||
      local key=$(aws configure get aws_access_key_id)
 | 
					      local key=$(aws configure get aws_access_key_id)
 | 
				
			||||||
      if which md5 > /dev/null 2>&1; then
 | 
					      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
 | 
					      else
 | 
				
			||||||
        project_hash=$(echo -n "${USER} ${key}" | md5sum | awk '{ print $1 }')
 | 
					        project_hash=$(echo -n "${USER} ${key} ${INSTANCE_PREFIX}" | md5sum | awk '{ print $1 }')
 | 
				
			||||||
      fi
 | 
					      fi
 | 
				
			||||||
      AWS_S3_BUCKET="kubernetes-staging-${project_hash}"
 | 
					      AWS_S3_BUCKET="kubernetes-staging-${project_hash}"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user