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.
109
109
| namespace | Namespace for the Kubernetes service account | ` string ` | ` "default" ` | no |
110
110
| project\_ id | GCP project ID | ` string ` | n/a | yes |
111
111
| 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 |
112
113
| use\_ existing\_ gcp\_ sa | Use an existing Google service account instead of creating one | ` bool ` | ` false ` | no |
113
114
| use\_ existing\_ k8s\_ sa | Use an existing kubernetes service account instead of creating one | ` bool ` | ` false ` | no |
114
115
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ module "annotate-sa" {
68
68
cluster_location = var. location
69
69
project_id = local. k8s_sa_project_id
70
70
impersonate_service_account = var. impersonate_service_account
71
+ use_existing_context = var. use_existing_context
71
72
72
73
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 } "
73
74
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" {
95
95
type = string
96
96
default = " "
97
97
}
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