From ec3e925a03851d6f982f9a89b9cb57034540b8ce Mon Sep 17 00:00:00 2001 From: "juvenal.diaz" Date: Wed, 7 Oct 2026 11:44:27 -0600 Subject: [PATCH] fix: serialize Kubernetes OpenTofu applies --- lib/jeannie/pipeline.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/jeannie/pipeline.sh b/lib/jeannie/pipeline.sh index b5893b3..d0789f6 100644 --- a/lib/jeannie/pipeline.sh +++ b/lib/jeannie/pipeline.sh @@ -629,6 +629,15 @@ run_tofu_stack() { apply_args+=("-var-file=${LAB_CLUSTER_VAR_FILE}") fi + if [[ "${stack}" == "bootstrap/platform" || "${stack}" == "bootstrap/apps" ]]; then + local k8s_tofu_parallelism="${LAB_TOFU_K8S_PARALLELISM:-1}" + if ! [[ "${k8s_tofu_parallelism}" =~ ^[0-9]+$ ]] || ((k8s_tofu_parallelism < 1)); then + echo "LAB_TOFU_K8S_PARALLELISM must be a positive integer." >&2 + exit 1 + fi + apply_args+=("-parallelism=${k8s_tofu_parallelism}") + fi + if [[ "${stack}" == "bootstrap/platform" ]]; then configure_platform_grafana_sso fi