From 5774acc04ef963b55460261aa741ec9452f89c13 Mon Sep 17 00:00:00 2001 From: Elena Viter Date: Thu, 6 Jul 2023 16:36:30 +0200 Subject: [PATCH] Editors deployments: allow optional default service account linkage as specified by FlowForge helm deployment --- README.md | 1 + kubernetes.js | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 2cab248..9589158 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,4 @@ Next variables are read from flowforge process environment in runtime: * `INGRESS_CLASS_NAME` - `Ingress` class name for editor instances * `INGRESS_ANNOTATIONS` - `Ingress` annotations for editor instances as JSON-encoded object * `DEPLOYMENT_TOLERATIONS` - Editor `Deployment` tolerations as JSON-encoded object +* `EDITOR_SERVICE_ACCOUNT` - Editor service account. diff --git a/kubernetes.js b/kubernetes.js index 99879a8..4afcca3 100644 --- a/kubernetes.js +++ b/kubernetes.js @@ -232,6 +232,7 @@ const createDeployment = async (project, options) => { localPod.metadata.labels.app = project.id localPod.metadata.labels.name = project.safeName + localPod.spec.serviceAccount = process.env.EDITOR_SERVICE_ACCOUNT if (stack.container) { localPod.spec.containers[0].image = stack.container