mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	Correct gcloud list arg from '--zone' to '--zones'
`--zone` was accepted as an abbreviation but is now deprecated and will be disabled entirely in gcloud 132.0.0.
This commit is contained in:
		
				
					committed by
					
						
						Bryan Boreham
					
				
			
			
				
	
			
			
			
						parent
						
							31da82df52
						
					
				
				
					commit
					f5159b49c2
				
			@@ -74,11 +74,11 @@ echo "Provider: ${KUBERNETES_PROVIDER:-}"
 | 
			
		||||
# List resources related to instances, filtering by the instance prefix if
 | 
			
		||||
# provided.
 | 
			
		||||
gcloud-compute-list instance-templates --regexp="${INSTANCE_PREFIX}.*"
 | 
			
		||||
gcloud-compute-list instance-groups ${ZONE:+"--zone=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
 | 
			
		||||
gcloud-compute-list instances ${ZONE:+"--zone=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
 | 
			
		||||
gcloud-compute-list instance-groups ${ZONE:+"--zones=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
 | 
			
		||||
gcloud-compute-list instances ${ZONE:+"--zones=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
 | 
			
		||||
 | 
			
		||||
# List disk resources, filterying by instance prefix if provided.
 | 
			
		||||
gcloud-compute-list disks ${ZONE:+"--zone=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
 | 
			
		||||
gcloud-compute-list disks ${ZONE:+"--zones=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
 | 
			
		||||
 | 
			
		||||
# List network resources. We include names starting with "a", corresponding to
 | 
			
		||||
# those that Kubernetes creates.
 | 
			
		||||
 
 | 
			
		||||
@@ -221,7 +221,7 @@ function do-node-upgrade() {
 | 
			
		||||
  for group in ${INSTANCE_GROUPS[@]}; do
 | 
			
		||||
    old_templates+=($(gcloud compute instance-groups managed list \
 | 
			
		||||
        --project="${PROJECT}" \
 | 
			
		||||
        --zone="${ZONE}" \
 | 
			
		||||
        --zones="${ZONE}" \
 | 
			
		||||
        --regexp="${group}" \
 | 
			
		||||
        --format='value(instanceTemplate)' || true))
 | 
			
		||||
    update=$(gcloud alpha compute rolling-updates \
 | 
			
		||||
 
 | 
			
		||||
@@ -333,7 +333,7 @@ function detect-node-names {
 | 
			
		||||
  detect-project
 | 
			
		||||
  INSTANCE_GROUPS=()
 | 
			
		||||
  INSTANCE_GROUPS+=($(gcloud compute instance-groups managed list \
 | 
			
		||||
    --zone "${ZONE}" --project "${PROJECT}" \
 | 
			
		||||
    --zones "${ZONE}" --project "${PROJECT}" \
 | 
			
		||||
    --regexp "${NODE_INSTANCE_PREFIX}-.+" \
 | 
			
		||||
    --format='value(instanceGroup)' || true))
 | 
			
		||||
  NODE_NAMES=()
 | 
			
		||||
@@ -1163,7 +1163,7 @@ function kube-down {
 | 
			
		||||
  # Find out what minions are running.
 | 
			
		||||
  local -a minions
 | 
			
		||||
  minions=( $(gcloud compute instances list \
 | 
			
		||||
                --project "${PROJECT}" --zone "${ZONE}" \
 | 
			
		||||
                --project "${PROJECT}" --zones "${ZONE}" \
 | 
			
		||||
                --regexp "${NODE_INSTANCE_PREFIX}-.+" \
 | 
			
		||||
                --format='value(name)') )
 | 
			
		||||
  # If any minions are running, delete them in batches.
 | 
			
		||||
@@ -1275,7 +1275,7 @@ function check-resources {
 | 
			
		||||
  # Find out what minions are running.
 | 
			
		||||
  local -a minions
 | 
			
		||||
  minions=( $(gcloud compute instances list \
 | 
			
		||||
                --project "${PROJECT}" --zone "${ZONE}" \
 | 
			
		||||
                --project "${PROJECT}" --zones "${ZONE}" \
 | 
			
		||||
                --regexp "${NODE_INSTANCE_PREFIX}-.+" \
 | 
			
		||||
                --format='value(name)') )
 | 
			
		||||
  if (( "${#minions[@]}" > 0 )); then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user