1 changed file
gcp | ||
.envrc | ||
Add comment 143 # export CLOUDSDK_CONTAINER_CLUSTER="${gke_clusters[*]}"
Add comment 144 #fi
Add comment 145
Add comment 146 Minus gke_clusters="$(gcloud container clusters list --format='get(name)')"
Add comment 146 Plus gke_clusters="$(
Add comment 147 Plus gcloud container clusters list --format='get(name)' |
Add comment 148 Plus sed '/^[[:space:]]*$/d'
Add comment 149 Plus )"
Add comment 147 150
Add comment 148 151 if [ -n "$gke_clusters" ]; then
Add comment 149 152 num_gke_clusters="$(grep -c . <<< "$gke_clusters")"
Add comment 157 160 GKE_CLUSTER="$gke_clusters"
Add comment 158 161 fi
Add comment 159 162 fi
Add comment 163 Plus else
Add comment 164 Plus num_gke_clusters=0
Add comment 160 165 fi
Add comment 161 166
Add comment 162 167 # alternatively call gke_kube_context() function in .envrc-kubernetes which will do this