Skip to content

Commit

Permalink
Merge pull request #3 from hudomju/ahybrid-register-cluster
Browse files Browse the repository at this point in the history
ahybrid: update fleet registration command
  • Loading branch information
hudomju authored Aug 11, 2022
2 parents 6652484 + 07ae520 commit 5609516
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion courses/ahybrid/v1.0/common/scripts/c2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ gcloud beta container clusters create ${C1_NAME} \
echo "Registering the gke cluster..."
for (( i=1; i<=4; i++))
do
res=$(gcloud container hub memberships register ${C1_NAME}-connect --gke-cluster=${C1_ZONE}/${C1_NAME} --enable-workload-identity 2>&1)
res=$(gcloud container fleet memberships register ${C1_NAME}-connect --gke-cluster=${C1_ZONE}/${C1_NAME} --enable-workload-identity 2>&1)
g1=$(echo $res | grep "PERMISSION_DENIED: hub default service account does not have access to the GKE cluster project for")
g2=$(echo $res | grep -c "PERMISSION_DENIED: hub default service account does not have access to the GKE cluster project for")
if [[ "$g2" == "0" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion courses/ahybrid/v1.0/common/scripts/create_gke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ gcloud beta container clusters create ${C1_NAME} \
echo "Registering the gke cluster..."
for (( i=1; i<=4; i++))
do
res=$(gcloud container hub memberships register ${C1_NAME}-connect --gke-cluster=${C1_ZONE}/${C1_NAME} --enable-workload-identity 2>&1)
res=$(gcloud container fleet memberships register ${C1_NAME}-connect --gke-cluster=${C1_ZONE}/${C1_NAME} --enable-workload-identity 2>&1)
g1=$(echo $res | grep "PERMISSION_DENIED: hub default service account does not have access to the GKE cluster project for")
g2=$(echo $res | grep -c "PERMISSION_DENIED: hub default service account does not have access to the GKE cluster project for")
if [[ "$g2" == "0" ]]; then
Expand Down

0 comments on commit 5609516

Please sign in to comment.