mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #44465 from bowei/fix-cluster-up
Automatic merge from submit-queue Missing --project in the cluster up scripts for gce ```release-note NONE ```
This commit is contained in:
		@@ -736,7 +736,9 @@ function create-subnetwork() {
 | 
			
		||||
  # Look for the subnet, it must exist and have a secondary range
 | 
			
		||||
  # configured.
 | 
			
		||||
  local subnet=$(gcloud alpha compute networks subnets describe \
 | 
			
		||||
    --region ${REGION} ${IP_ALIAS_SUBNETWORK} 2>/dev/null)
 | 
			
		||||
    --project "${PROJECT}" \
 | 
			
		||||
    --region ${REGION} \
 | 
			
		||||
    ${IP_ALIAS_SUBNETWORK} 2>/dev/null)
 | 
			
		||||
  if [[ -z ${subnet} ]]; then
 | 
			
		||||
    # Only allow auto-creation for default subnets
 | 
			
		||||
    if [[ ${IP_ALIAS_SUBNETWORK} != ${INSTANCE_PREFIX}-subnet-default ]]; then
 | 
			
		||||
@@ -753,6 +755,7 @@ function create-subnetwork() {
 | 
			
		||||
    gcloud alpha compute networks subnets create \
 | 
			
		||||
      ${IP_ALIAS_SUBNETWORK} \
 | 
			
		||||
      --description "Automatically generated subnet for ${INSTANCE_PREFIX} cluster. This will be removed on cluster teardown." \
 | 
			
		||||
      --project "${PROJECT}" \
 | 
			
		||||
      --network ${NETWORK} \
 | 
			
		||||
      --region ${REGION} \
 | 
			
		||||
      --range ${NODE_IP_RANGE} \
 | 
			
		||||
@@ -800,9 +803,13 @@ function delete-subnetwork() {
 | 
			
		||||
 | 
			
		||||
  echo "Removing auto-created subnet ${NETWORK}:${IP_ALIAS_SUBNETWORK}"
 | 
			
		||||
  if [[ -n $(gcloud alpha compute networks subnets describe \
 | 
			
		||||
        --region ${REGION} ${IP_ALIAS_SUBNETWORK} 2>/dev/null) ]]; then
 | 
			
		||||
        --project "${PROJECT}" \
 | 
			
		||||
        --region ${REGION} \
 | 
			
		||||
        ${IP_ALIAS_SUBNETWORK} 2>/dev/null) ]]; then
 | 
			
		||||
    gcloud alpha --quiet compute networks subnets delete \
 | 
			
		||||
      --region ${REGION} ${IP_ALIAS_SUBNETWORK}
 | 
			
		||||
      --project "${PROJECT}" \
 | 
			
		||||
      --region ${REGION} \
 | 
			
		||||
      ${IP_ALIAS_SUBNETWORK}
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user