File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ title : " Falcon Operator Container Push Agent"
2+ description : " Role that enables pushing to GCR"
3+ stage : " ALPHA"
4+ includedPermissions :
5+ - storage.buckets.get
6+ - storage.objects.create
7+ - storage.objects.delete
8+ - storage.objects.get
9+ - storage.objects.list
Original file line number Diff line number Diff line change @@ -82,13 +82,20 @@ kubectl create ns $FALCON_SYSTEM_CONFIGURE --dry-run=client -o yaml | kubectl ap
8282GCP_PROJECT_ID=$( gcloud config get-value core/project)
8383
8484if ! kubectl get secret builder -n $FALCON_SYSTEM_CONFIGURE > /dev/null 2>&1 ; then
85+ GCP_ROLE_NAME=falconOperatorPush
8586 if ! gcloud iam service-accounts describe falcon-operator@$GCP_PROJECT_ID .iam.gserviceaccount.com > /dev/null 2>&1 ; then
87+
88+ if ! gcloud iam roles describe " $GCP_ROLE_NAME " --project " $GCP_PROJECT_ID " > /dev/null 2>&1 ; then
89+ gcloud iam roles create " $GCP_ROLE_NAME " --project=" $GC_PROJECT_ID " \
90+ --file=
91+ fi
92+
8693 gcloud iam service-accounts create falcon-operator
8794 fi
8895
8996 gcloud projects add-iam-policy-binding $GCP_PROJECT_ID \
9097 --member serviceAccount:falcon-operator@$GCP_PROJECT_ID .iam.gserviceaccount.com \
91- --role roles/storage.admin
98+ --role roles/" $GCP_ROLE_NAME "
9299
93100 gcloud iam service-accounts keys create \
94101 --iam-account " falcon-operator@$GCP_PROJECT_ID .iam.gserviceaccount.com" \
You can’t perform that action at this time.
0 commit comments