Skip to content

Commit

Permalink
feat: Add internalJWTMap variables used for inter service request aut…
Browse files Browse the repository at this point in the history
…hentication (#309)

* ini commit

* update variables and main with new var
  • Loading branch information
KyleGoyette authored Dec 2, 2024
1 parent 7ed0c92 commit f281ca4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
13 changes: 12 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ module "iam_role" {
aws_iam_openid_connect_provider_url = module.app_eks.aws_iam_openid_connect_provider
}

locals {
weave_trace_sa_name = "wandb-weave-trace"
}

module "wandb" {
source = "wandb/wandb/helm"
version = "1.2.0"
Expand Down Expand Up @@ -320,7 +324,14 @@ module "wandb" {

}

app = {}
app = {
internalJWTMap = [
{
"subject" = "system:serviceaccount:default:${local.weave_trace_sa_name}",
"issuer" = var.kubernetes_cluster_oidc_issuer_url
}
]
}

# To support otel rds and redis metrics, we need operator-wandb chart min version 0.13.8 (yace subchart)
yace = var.enable_yace ? {
Expand Down
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -522,3 +522,13 @@ variable "clickhouse_endpoint_service_id" {
description = "The service ID of the VPC endpoint service for Clickhouse"
default = ""
}

##########################################
# Internal Service #
##########################################

variable "kubernetes_cluster_oidc_issuer_url" {
type = string
description = "OIDC issuer URL for the Kubernetes cluster. Can be determined using `kubectl get --raw /.well-known/openid-configuration`"
default = ""
}

0 comments on commit f281ca4

Please sign in to comment.