Skip to content

Commit 2335efd

Browse files
tfadeyioluwole.fadeyi
andauthored
Update gke package configuration docs (#192)
Signed-off-by: Oluwole Fadeyi <[email protected]> Co-authored-by: oluwole.fadeyi <[email protected]>
1 parent cf3b9ec commit 2335efd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/datagatherers/gke.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ resource "google_project_iam_member" "preflight_agent_cluster_viewer" {
100100
101101
# if using workload identity in GKE, use the following binding to allow the
102102
# agent to use the service account
103-
resource "google_project_iam_binding" "preflight_agent_workload_identity" {
104-
project = var.project_id
103+
resource "google_service_account_iam_binding" "preflight_agent_workload_identity" {
104+
service_account_id = google_service_account.preflight_agent_service_account.name
105105
role = "roles/iam.workloadIdentityUser"
106-
members = "serviceAccount:${var.project_id}.svc.id.goog[preflight/default]"
106+
members = ["serviceAccount:${var.project_id}.svc.id.goog[preflight/agent]"]
107107
}
108108
```
109+
110+
An annotation specifing the gcp service account must be added to the agent's k8s service account
111+
`iam.gke.io/gcp-service-account=<gsa_name>@<gsa_project.iam.gserviceaccount.com>`

0 commit comments

Comments
 (0)