From 4613974aeab6053e4bd4e08b7605d8030879a8a1 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Fri, 24 Jul 2026 08:23:41 -0700 Subject: [PATCH] feat(helm): Add env/volume injection hooks to the worker Deployment. --- tools/deployment/spider-helm/Chart.yaml | 2 +- .../spider-helm/templates/worker-deployment.yaml | 11 +++++++---- tools/deployment/spider-helm/values.yaml | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/deployment/spider-helm/Chart.yaml b/tools/deployment/spider-helm/Chart.yaml index 4cfb59ab0..7015f1a69 100644 --- a/tools/deployment/spider-helm/Chart.yaml +++ b/tools/deployment/spider-helm/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: "v2" name: "spider" description: "A Helm chart for the Spider Huntsman deployment" type: "application" -version: "0.1.3" +version: "0.1.4" appVersion: "0.1.0" home: "https://github.com/y-scope/spider" sources: ["https://github.com/y-scope/spider"] diff --git a/tools/deployment/spider-helm/templates/worker-deployment.yaml b/tools/deployment/spider-helm/templates/worker-deployment.yaml index fede13a2d..2443f803d 100644 --- a/tools/deployment/spider-helm/templates/worker-deployment.yaml +++ b/tools/deployment/spider-helm/templates/worker-deployment.yaml @@ -24,17 +24,20 @@ spec: command: ["spider-execution-manager", "--config", "/etc/spider/execution-manager.yaml"] {{- with .Values.spiderConfig.worker.extra_envs }} env: - {{- range $name, $value := . }} - - name: {{ $name | quote }} - value: {{ $value | quote }} - {{- end }} + {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} volumeMounts: - name: "config" mountPath: "/etc/spider/execution-manager.yaml" subPath: "execution-manager.yaml" readOnly: true + {{- with .Values.spiderConfig.worker.extra_volume_mounts }} + {{- tpl (toYaml .) $ | nindent 12 }} + {{- end }} volumes: - name: "config" configMap: name: {{ include "spider.componentFullname" (dict "root" . "component" "config") }} + {{- with .Values.spiderConfig.worker.extra_volumes }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} diff --git a/tools/deployment/spider-helm/values.yaml b/tools/deployment/spider-helm/values.yaml index 7f2ba452d..627792cd8 100644 --- a/tools/deployment/spider-helm/values.yaml +++ b/tools/deployment/spider-helm/values.yaml @@ -75,5 +75,7 @@ spiderConfig: task_capacity: 1048576 worker: - extra_envs: {} + extra_envs: [] + extra_volume_mounts: [] + extra_volumes: [] replicas: 4