From 7aebbffd0672098bf58b83c688b16bda7e9cea89 Mon Sep 17 00:00:00 2001 From: dzueck Date: Mon, 14 Sep 2026 12:11:41 -0700 Subject: [PATCH 1/2] feat: support for vm runtime configurations for compute units and texera micro services --- .../access-control-service-deployment.yaml | 3 +++ .../base/agent-service/agent-service-deployment.yaml | 3 +++ .../config-service/config-service-deployment.yaml | 3 +++ .../example-data-loader/example-data-loader-job.yaml | 3 +++ .../base/file-service/file-service-deployment.yaml | 3 +++ bin/k8s/templates/base/lakefs/lakefs-setup-job.yaml | 3 +++ .../templates/base/litellm/litellm-deployment.yaml | 3 +++ .../base/webserver/webserver-deployment.yaml | 3 +++ .../workflow-compiling-service-deployment.yaml | 3 +++ .../workflow-computing-unit-manager-deployment.yaml | 3 +++ ...kflow-computing-unit-master-prepull-daemonset.yaml | 3 +++ bin/k8s/values.yaml | 6 ++++++ .../apache/texera/service/util/KubernetesClient.scala | 11 ++++++++--- 13 files changed, 47 insertions(+), 3 deletions(-) diff --git a/bin/k8s/templates/base/access-control-service/access-control-service-deployment.yaml b/bin/k8s/templates/base/access-control-service/access-control-service-deployment.yaml index 7d637203650..99419d1f549 100644 --- a/bin/k8s/templates/base/access-control-service/access-control-service-deployment.yaml +++ b/bin/k8s/templates/base/access-control-service/access-control-service-deployment.yaml @@ -37,6 +37,9 @@ spec: # for a dedicated identity. serviceAccountName: {{ .Values.accessControlService.serviceAccountName }} {{- end }} + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} containers: - name: {{ .Values.accessControlService.name }} image: {{ .Values.texera.imageRegistry }}/{{ .Values.accessControlService.imageName }}:{{ .Values.texera.imageTag }} diff --git a/bin/k8s/templates/base/agent-service/agent-service-deployment.yaml b/bin/k8s/templates/base/agent-service/agent-service-deployment.yaml index 399b3a90581..4732bae1fa4 100644 --- a/bin/k8s/templates/base/agent-service/agent-service-deployment.yaml +++ b/bin/k8s/templates/base/agent-service/agent-service-deployment.yaml @@ -33,6 +33,9 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.agentService.name }} spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} containers: - name: {{ .Values.agentService.name }} image: {{ .Values.texera.imageRegistry }}/{{ .Values.agentService.imageName }}:{{ .Values.texera.imageTag }} diff --git a/bin/k8s/templates/base/config-service/config-service-deployment.yaml b/bin/k8s/templates/base/config-service/config-service-deployment.yaml index d6775483eb9..7b86369f256 100644 --- a/bin/k8s/templates/base/config-service/config-service-deployment.yaml +++ b/bin/k8s/templates/base/config-service/config-service-deployment.yaml @@ -32,6 +32,9 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.configService.name }} spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} containers: - name: {{ .Values.configService.name }} image: {{ .Values.texera.imageRegistry }}/{{ .Values.configService.imageName }}:{{ .Values.texera.imageTag }} diff --git a/bin/k8s/templates/base/example-data-loader/example-data-loader-job.yaml b/bin/k8s/templates/base/example-data-loader/example-data-loader-job.yaml index 15759be4097..f245350cab4 100644 --- a/bin/k8s/templates/base/example-data-loader/example-data-loader-job.yaml +++ b/bin/k8s/templates/base/example-data-loader/example-data-loader-job.yaml @@ -27,6 +27,9 @@ spec: metadata: name: {{ .Release.Name }}-example-data-loader spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} restartPolicy: Never containers: - name: example-data-loader diff --git a/bin/k8s/templates/base/file-service/file-service-deployment.yaml b/bin/k8s/templates/base/file-service/file-service-deployment.yaml index 6a9190bc6cf..b60eddf11b5 100644 --- a/bin/k8s/templates/base/file-service/file-service-deployment.yaml +++ b/bin/k8s/templates/base/file-service/file-service-deployment.yaml @@ -32,6 +32,9 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.fileService.name }} spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} containers: - name: {{ .Values.fileService.name }} image: {{ .Values.texera.imageRegistry }}/{{ .Values.fileService.imageName }}:{{ .Values.texera.imageTag }} diff --git a/bin/k8s/templates/base/lakefs/lakefs-setup-job.yaml b/bin/k8s/templates/base/lakefs/lakefs-setup-job.yaml index 914a6144064..b7fdd51364b 100644 --- a/bin/k8s/templates/base/lakefs/lakefs-setup-job.yaml +++ b/bin/k8s/templates/base/lakefs/lakefs-setup-job.yaml @@ -26,6 +26,9 @@ spec: metadata: name: {{ .Release.Name }}-lakefs-setup-job spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} restartPolicy: Never containers: - name: setup-lakefs diff --git a/bin/k8s/templates/base/litellm/litellm-deployment.yaml b/bin/k8s/templates/base/litellm/litellm-deployment.yaml index ba681da7d16..7bc729ef87d 100644 --- a/bin/k8s/templates/base/litellm/litellm-deployment.yaml +++ b/bin/k8s/templates/base/litellm/litellm-deployment.yaml @@ -33,6 +33,9 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.litellm.name }} spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} containers: - name: {{ .Values.litellm.name }} image: {{ .Values.litellm.image }} diff --git a/bin/k8s/templates/base/webserver/webserver-deployment.yaml b/bin/k8s/templates/base/webserver/webserver-deployment.yaml index 983c6269947..99a58870957 100644 --- a/bin/k8s/templates/base/webserver/webserver-deployment.yaml +++ b/bin/k8s/templates/base/webserver/webserver-deployment.yaml @@ -32,6 +32,9 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.webserver.name }} spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} containers: - name: {{ .Values.webserver.name }} image: {{ .Values.texera.imageRegistry }}/{{ .Values.webserver.imageName }}:{{ .Values.texera.imageTag }} diff --git a/bin/k8s/templates/base/workflow-compiling-service/workflow-compiling-service-deployment.yaml b/bin/k8s/templates/base/workflow-compiling-service/workflow-compiling-service-deployment.yaml index 2061e9e53ef..a538ce4a86f 100644 --- a/bin/k8s/templates/base/workflow-compiling-service/workflow-compiling-service-deployment.yaml +++ b/bin/k8s/templates/base/workflow-compiling-service/workflow-compiling-service-deployment.yaml @@ -32,6 +32,9 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.workflowCompilingService.name }} spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} containers: - name: {{ .Values.workflowCompilingService.name }} image: {{ .Values.texera.imageRegistry }}/{{ .Values.workflowCompilingService.imageName }}:{{ .Values.texera.imageTag }} diff --git a/bin/k8s/templates/base/workflow-computing-unit-manager/workflow-computing-unit-manager-deployment.yaml b/bin/k8s/templates/base/workflow-computing-unit-manager/workflow-computing-unit-manager-deployment.yaml index 6ad4eeb4be3..ab36ccec634 100644 --- a/bin/k8s/templates/base/workflow-computing-unit-manager/workflow-computing-unit-manager-deployment.yaml +++ b/bin/k8s/templates/base/workflow-computing-unit-manager/workflow-computing-unit-manager-deployment.yaml @@ -32,6 +32,9 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.workflowComputingUnitManager.name }} spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} serviceAccountName: {{ .Values.workflowComputingUnitManager.serviceAccountName }} initContainers: - name: wait-lakekeeper diff --git a/bin/k8s/templates/base/workflow-computing-unit-pool/workflow-computing-unit-master-prepull-daemonset.yaml b/bin/k8s/templates/base/workflow-computing-unit-pool/workflow-computing-unit-master-prepull-daemonset.yaml index 4edc0104a89..b85a6feedba 100644 --- a/bin/k8s/templates/base/workflow-computing-unit-pool/workflow-computing-unit-master-prepull-daemonset.yaml +++ b/bin/k8s/templates/base/workflow-computing-unit-pool/workflow-computing-unit-master-prepull-daemonset.yaml @@ -31,6 +31,9 @@ spec: labels: app: {{ .Release.Name }}-computing-unit-master-prepuller spec: + {{- if .Values.global.texeraMicroServiceRuntimeClass }} + runtimeClassName: {{ .Values.global.texeraMicroServiceRuntimeClass | quote }} + {{- end }} restartPolicy: Always tolerations: - operator: "Exists" diff --git a/bin/k8s/values.yaml b/bin/k8s/values.yaml index 438821b82d2..c0bc3d7714b 100644 --- a/bin/k8s/values.yaml +++ b/bin/k8s/values.yaml @@ -22,6 +22,7 @@ texera: imageTag: 1.4.0-incubating-SNAPSHOT global: + texeraMicroServiceRuntimeClass: "" # "kata-qemu-runtime-rs" # Required by the Bitnami postgresql sub-chart to allow custom images security: allowInsecureImages: true @@ -509,6 +510,11 @@ texeraEnvVars: - name: AUTH_JWT_SECRET # Development-only default (256-bit HS256 secret). Production environments MUST override this with a different, securely generated secret. value: "a7f3c8e9b14d2e6f5a0b9c3d8e1f4a6b2c5d7e9f0a3b6c8d1e4f7a9b2c5d8e1f" + - name: KUBERNETES_COMPUTING_UNIT_RUNTIME_CLASS_CPU + value: "" #"kata-qemu-runtime-rs" + # value: "" + - name: KUBERNETES_COMPUTING_UNIT_RUNTIME_CLASS_GPU + value: "" #"kata-qemu-nvidia-gpu-runtime-rs" yWebsocketServer: name: y-websocket-server diff --git a/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/KubernetesClient.scala b/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/KubernetesClient.scala index 856a4234841..1353aeb0db8 100644 --- a/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/KubernetesClient.scala +++ b/computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/KubernetesClient.scala @@ -186,9 +186,14 @@ class KubernetesClient( .endMetadata() .withNewSpec() - // Only add runtimeClassName when using NVIDIA GPU - if (gpuLimit != "0" && KubernetesConfig.gpuResourceKey.contains("nvidia")) { - specBuilder.withRuntimeClassName("nvidia") + val runtimeClassOpt: Option[String] = if (gpuLimit != "0") { + sys.env.get("KUBERNETES_COMPUTING_UNIT_RUNTIME_CLASS_GPU").filter(_.nonEmpty) + } else { + sys.env.get("KUBERNETES_COMPUTING_UNIT_RUNTIME_CLASS_CPU").filter(_.nonEmpty) + } + + runtimeClassOpt.foreach { runtimeClass => + specBuilder.withRuntimeClassName(runtimeClass) } val containerBuilder = specBuilder From 9903be009e5b57f18382fb822f372c9908765232 Mon Sep 17 00:00:00 2001 From: dzueck Date: Thu, 17 Sep 2026 12:24:47 -0700 Subject: [PATCH 2/2] fix: Enhance comments for Kubernetes runtime class configuration Signed-off-by: dzueck --- bin/k8s/values.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/k8s/values.yaml b/bin/k8s/values.yaml index c0bc3d7714b..9a1660b89a3 100644 --- a/bin/k8s/values.yaml +++ b/bin/k8s/values.yaml @@ -22,7 +22,10 @@ texera: imageTag: 1.4.0-incubating-SNAPSHOT global: - texeraMicroServiceRuntimeClass: "" # "kata-qemu-runtime-rs" + # If using VMs for texera specific microservices, change this to the desired runtime otherwise leave as "". Recommended: "kata-qemu-runtime-rs" + # Note: kata containers must be installed to use kata-qemu-runtime-rs + # Note: This does not change the runtime of dependencies or Compute Units. + texeraMicroServiceRuntimeClass: "" # Required by the Bitnami postgresql sub-chart to allow custom images security: allowInsecureImages: true @@ -511,10 +514,13 @@ texeraEnvVars: # Development-only default (256-bit HS256 secret). Production environments MUST override this with a different, securely generated secret. value: "a7f3c8e9b14d2e6f5a0b9c3d8e1f4a6b2c5d7e9f0a3b6c8d1e4f7a9b2c5d8e1f" - name: KUBERNETES_COMPUTING_UNIT_RUNTIME_CLASS_CPU - value: "" #"kata-qemu-runtime-rs" - # value: "" + # If using VMs for CUs change this to the desired runtime otherwise leave as "". Recommended: "kata-qemu-runtime-rs" + # Note: kata containers must be installed to use kata-qemu-runtime-rs + value: "" - name: KUBERNETES_COMPUTING_UNIT_RUNTIME_CLASS_GPU - value: "" #"kata-qemu-nvidia-gpu-runtime-rs" + # If using VMs for CUs change this to the desired runtime otherwise leave as "". Recommended: "kata-qemu-nvidia-gpu-runtime-rs" + # Note: kata containers must be installed to use kata-qemu-nvidia-gpu-runtime-r + value: "" yWebsocketServer: name: y-websocket-server