Skip to content

Commit

Permalink
Minor flyte role updates (#227)
Browse files Browse the repository at this point in the history
* move flyteadmin to the dataplane role, clean up a few things

* restrict to runs in compute namespace instead of all pods

* move flyteadmin back to control plane
  • Loading branch information
noahjax authored Mar 14, 2024
1 parent c2121d8 commit 96ac77c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/flyte/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ resource "aws_iam_role" "flyte_controlplane" {
StringEquals : {
"${trimprefix(local.oidc_provider_url, "https://")}:aud" : "sts.amazonaws.com",
"${trimprefix(local.oidc_provider_url, "https://")}:sub" : [
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.datacatalog}",
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.flyteadmin}",
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.flytepropeller}",
]
Expand Down Expand Up @@ -68,15 +69,14 @@ resource "aws_iam_role" "flyte_dataplane" {
Federated = local.oidc_provider_arn
}
Condition : {
StringEquals : {
StringLike : {
"${trimprefix(local.oidc_provider_url, "https://")}:aud" : "sts.amazonaws.com",
"${trimprefix(local.oidc_provider_url, "https://")}:sub" : [
"system:serviceaccount:${var.platform_namespace}:${var.serviceaccount_names.datacatalog}",
"system:serviceaccount:${var.compute_namespace}:*"
"system:serviceaccount:${var.compute_namespace}:run-*"
]
}
}
},
}
]
})
}
Expand Down

0 comments on commit 96ac77c

Please sign in to comment.