From 141fe5966fdc117b7d249efb9f31e7a152d9730c Mon Sep 17 00:00:00 2001
From: forficate <260708+forficate@users.noreply.github.com>
Date: Thu, 7 Mar 2024 14:50:30 +1100
Subject: [PATCH] Output the Spark service account so we can reference it (#23)
---
modules/app-all/README.md | 4 ++++
modules/app-all/outputs.tf | 5 +++++
modules/app-spark-server/README.md | 4 ++++
modules/app-spark-server/outputs.tf | 4 ++++
4 files changed, 17 insertions(+)
diff --git a/modules/app-all/README.md b/modules/app-all/README.md
index 5b5a189..fc18796 100644
--- a/modules/app-all/README.md
+++ b/modules/app-all/README.md
@@ -1202,6 +1202,10 @@ Description: The Kubernetes used for deployments
Description: The Kubernetes service account used for deployments
+### [kubernetes\_service\_account\_spark\_executor\_driver](#output\_kubernetes\_service\_account\_spark\_executor\_driver)
+
+Description: The Kubernetes service account used for Spark
+
### [kubernetes\_service\_name\_anaml\_server](#output\_kubernetes\_service\_name\_anaml\_server)
Description: n/a
diff --git a/modules/app-all/outputs.tf b/modules/app-all/outputs.tf
index b4d2b2f..3251cd3 100644
--- a/modules/app-all/outputs.tf
+++ b/modules/app-all/outputs.tf
@@ -8,6 +8,11 @@ output "kubernetes_service_account" {
value = var.kubernetes_service_account_name
}
+output "kubernetes_service_account_spark_executor_driver" {
+ description = "The Kubernetes service account used for Spark"
+ value = module.spark-server.kubernetes_service_account
+}
+
output "kubernetes_namespace" {
description = "The Kubernetes used for deployments"
value = var.kubernetes_namespace_name
diff --git a/modules/app-spark-server/README.md b/modules/app-spark-server/README.md
index aa723fb..f310c48 100644
--- a/modules/app-spark-server/README.md
+++ b/modules/app-spark-server/README.md
@@ -630,6 +630,10 @@ The following outputs are exported:
Description: n/a
+### [kubernetes\_service\_account](#output\_kubernetes\_service\_account)
+
+Description: n/a
+
### [spark\_history\_server\_internal\_url](#output\_spark\_history\_server\_internal\_url)
Description: n/a
diff --git a/modules/app-spark-server/outputs.tf b/modules/app-spark-server/outputs.tf
index 9c730db..2c93eda 100644
--- a/modules/app-spark-server/outputs.tf
+++ b/modules/app-spark-server/outputs.tf
@@ -19,3 +19,7 @@ output "anaml_spark_server_internal_url" {
)
}
}
+
+output "kubernetes_service_account" {
+ value = var.kubernetes_service_account_spark_driver_executor
+}