This is an automated email from the ASF dual-hosted git repository.

lidongdai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 114a9d2a30 feat(helm): Add support for existing ConfigMap (#10518)
114a9d2a30 is described below

commit 114a9d2a30c7a32d0448bab5e494d06a904ae300
Author: Murali <[email protected]>
AuthorDate: Sun Mar 1 16:23:02 2026 +0530

    feat(helm): Add support for existing ConfigMap (#10518)
---
 deploy/kubernetes/seatunnel/templates/_helpers.tpl            | 11 +++++++++++
 deploy/kubernetes/seatunnel/templates/configmap.yaml          |  2 ++
 .../seatunnel/templates/deployment-seatunnel-master.yaml      |  2 +-
 .../seatunnel/templates/deployment-seatunnel-worker.yaml      |  2 +-
 deploy/kubernetes/seatunnel/values.yaml                       | 10 ++++++++++
 5 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/deploy/kubernetes/seatunnel/templates/_helpers.tpl 
b/deploy/kubernetes/seatunnel/templates/_helpers.tpl
index 9f7c0846b2..a85e08a44b 100644
--- a/deploy/kubernetes/seatunnel/templates/_helpers.tpl
+++ b/deploy/kubernetes/seatunnel/templates/_helpers.tpl
@@ -63,3 +63,14 @@ app.kubernetes.io/name: {{ include "seatunnel.fullname" . 
}}-worker
 app.kubernetes.io/component: worker
 {{ include "seatunnel.common.labels" . }}
 {{- end -}}
+
+{{/*
+Get the ConfigMap name - either existing or the one to be created.
+*/}}
+{{- define "seatunnel.configMapName" -}}
+{{- if .Values.configMap.create -}}
+{{- include "seatunnel.fullname" . }}-configs
+{{- else -}}
+{{- .Values.configMap.existingConfigMapName }}
+{{- end -}}
+{{- end -}}
diff --git a/deploy/kubernetes/seatunnel/templates/configmap.yaml 
b/deploy/kubernetes/seatunnel/templates/configmap.yaml
index c5182c4b3a..1640fa4ed1 100644
--- a/deploy/kubernetes/seatunnel/templates/configmap.yaml
+++ b/deploy/kubernetes/seatunnel/templates/configmap.yaml
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+{{- if .Values.configMap.create }}
 apiVersion: v1
 kind: ConfigMap
 metadata:
@@ -26,4 +27,5 @@ data:
     {{- base $path | nindent 2 }}: |-
       {{- tpl ($.Files.Get $path) $ | nindent 4 -}}
   {{- end }}
+{{- end }}
 
diff --git 
a/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-master.yaml 
b/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-master.yaml
index 3bbf06cf36..f6d904410a 100644
--- a/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-master.yaml
+++ b/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-master.yaml
@@ -92,5 +92,5 @@ spec:
       volumes:
         - name: seatunnel-configs
           configMap:
-            name: {{ include "seatunnel.fullname" . }}-configs
+            name: {{ include "seatunnel.configMapName" . }}
 
diff --git 
a/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-worker.yaml 
b/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-worker.yaml
index 4c0b7329d0..612db0c702 100644
--- a/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-worker.yaml
+++ b/deploy/kubernetes/seatunnel/templates/deployment-seatunnel-worker.yaml
@@ -90,4 +90,4 @@ spec:
       volumes:
         - name: seatunnel-configs
           configMap:
-            name: {{ include "seatunnel.fullname" . }}-configs
\ No newline at end of file
+            name: {{ include "seatunnel.configMapName" . }}
diff --git a/deploy/kubernetes/seatunnel/values.yaml 
b/deploy/kubernetes/seatunnel/values.yaml
index ec91284f5a..5bc253ab3f 100644
--- a/deploy/kubernetes/seatunnel/values.yaml
+++ b/deploy/kubernetes/seatunnel/values.yaml
@@ -25,6 +25,16 @@ image:
   pullPolicy: "IfNotPresent"
   pullSecret: ""
 
+# ConfigMap settings
+configMap:
+  # If true, create a new ConfigMap. If false, use existingConfigMapName
+  create: true
+  # Name of existing ConfigMap to use (only used when create=false)
+  # The ConfigMap should contain all config files: hazelcast-client.yaml, 
hazelcast-master.yaml,
+  # hazelcast-worker.yaml, jvm_client_options, jvm_master_options, 
jvm_worker_options,
+  # log4j2.properties, seatunnel.yaml
+  existingConfigMapName: ""
+
 # The env for pod
 env:
   - name: TZ

Reply via email to