Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Automated roles and APIs needed for Forseti on-GKE deployment (#498)
Browse files Browse the repository at this point in the history
* Automate all the roles and APIs needed for base installation of Forseti on-GKE

* Moved GKE API to GKE section
  • Loading branch information
red2k18 authored Feb 10, 2020
1 parent f18b3d0 commit 5ff1d12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helpers/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ if [[ -n "$WITH_ENFORCER" ]]; then
fi

if [[ -n "$ON_GKE" ]]; then
gke_roles=("roles/container.admin" "roles/compute.networkAdmin" "roles/resourcemanager.projectIamAdmin")
gke_roles=("roles/container.admin" "roles/compute.networkAdmin" "roles/resourcemanager.projectIamAdmin" "roles/container.clusterAdmin" "roles/container.developer" "roles/iam.serviceAccountKeyAdmin")

echo "Granting on-GKE related roles on project $PROJECT_ID..."
for gke_role in "${gke_roles[@]}"; do
Expand All @@ -250,6 +250,9 @@ if [[ -n "$ON_GKE" ]]; then
--role="$gke_role" \
--user-output-enabled false
done

echo "Enabling on-GKE releated services on project $PROJECT_ID..."
gcloud services enable container.googleapis.com --project "${PROJECT_ID}"
fi

if [[ $HOST_PROJECT_ID != "" ]];
Expand Down

0 comments on commit 5ff1d12

Please sign in to comment.