File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
modules/workload-identity Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ already bear the `"iam.gke.io/gcp-service-account"` annotation.
109109| namespace | Namespace for the Kubernetes service account | ` string ` | ` "default" ` | no |
110110| project\_ id | GCP project ID | ` string ` | n/a | yes |
111111| roles | A list of roles to be added to the created service account | ` list(string) ` | ` [] ` | no |
112+ | use\_ existing\_ context | An optional flag to use local kubectl config context. | ` bool ` | ` false ` | no |
112113| use\_ existing\_ gcp\_ sa | Use an existing Google service account instead of creating one | ` bool ` | ` false ` | no |
113114| use\_ existing\_ k8s\_ sa | Use an existing kubernetes service account instead of creating one | ` bool ` | ` false ` | no |
114115
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ module "annotate-sa" {
6868 cluster_location = var. location
6969 project_id = local. k8s_sa_project_id
7070 impersonate_service_account = var. impersonate_service_account
71+ use_existing_context = var. use_existing_context
7172
7273 kubectl_create_command = " kubectl annotate --overwrite sa -n ${ local . output_k8s_namespace } ${ local . k8s_given_name } iam.gke.io/gcp-service-account=${ local . gcp_sa_email } "
7374 kubectl_destroy_command = " kubectl annotate sa -n ${ local . output_k8s_namespace } ${ local . k8s_given_name } iam.gke.io/gcp-service-account-"
Original file line number Diff line number Diff line change @@ -95,3 +95,9 @@ variable "impersonate_service_account" {
9595 type = string
9696 default = " "
9797}
98+
99+ variable "use_existing_context" {
100+ description = " An optional flag to use local kubectl config context."
101+ type = bool
102+ default = false
103+ }
You can’t perform that action at this time.
0 commit comments