Skip to content

Commit

Permalink
feat: allow k6 operator service account in rdev/staging
Browse files Browse the repository at this point in the history
  • Loading branch information
christophermanahan committed Oct 1, 2024
1 parent 1912885 commit 2e4ea35
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion terraform/modules/happy-mesh-access-control/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
locals {
allow_ingress_controller = var.service_type == "EXTERNAL" || var.service_type == "INTERNAL" || var.service_type == "VPC"
allow_k6_operator_controller = var.deployment_stage == "rdev" || var.deployment_stage == "staging"
needs_policy = local.allow_ingress_controller || length(var.allow_mesh_services) > 0
# Service accounts that we want to allow access to this protected service
mesh_services_service_accounts = [for v in var.allow_mesh_services : {
Expand All @@ -17,6 +18,11 @@ locals {
"name" = "edu-platform-${var.deployment_stage}-status-page"
"namespace" = "status-page"
}]
k6_operator_service_account = local.allow_k6_operator_controller ? [{
"kind" = "ServiceAccount"
"name" = "k6-operator-controller"
"namespace" = "k6-operator-system"
}] : []
}

resource "kubernetes_manifest" "linkerd_server" {
Expand Down Expand Up @@ -53,7 +59,8 @@ resource "kubernetes_manifest" "linkerd_mesh_tls_authentication" {
"identityRefs" = concat(
local.mesh_services_service_accounts,
local.optional_ingress_controller_service_account,
local.status_page_service_account
local.status_page_service_account,
local.k6_operator_service_account
)
}
}
Expand Down

0 comments on commit 2e4ea35

Please sign in to comment.