This is an automated email from the ASF dual-hosted git repository.
jimin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-seata-k8s.git
The following commit(s) were added to refs/heads/master by this push:
new 3e7a4ae feature: add operator.seata.apache.org/v1/SeataServer helm
chart (#41)
3e7a4ae is described below
commit 3e7a4aeea49de2a90e5f1c3d7c4892674bb16c49
Author: jimin <[email protected]>
AuthorDate: Thu Nov 27 23:01:21 2025 +0800
feature: add operator.seata.apache.org/v1/SeataServer helm chart (#41)
---
helm/seata-server/Chart.yaml | 47 +++++
helm/seata-server/README.md | 246 +++++++++++++++++++++++++++
helm/seata-server/templates/NOTES.txt | 55 ++++++
helm/seata-server/templates/_helpers.tpl | 94 ++++++++++
helm/seata-server/templates/deployment.yaml | 98 +++++++++++
helm/seata-server/templates/seataserver.yaml | 77 +++++++++
helm/seata-server/templates/secret.yaml | 30 ++++
helm/seata-server/templates/service.yaml | 52 ++++++
helm/seata-server/values-cluster.yaml | 49 ++++++
helm/seata-server/values-standalone.yaml | 66 +++++++
helm/seata-server/values.yaml | 199 ++++++++++++++++++++++
11 files changed, 1013 insertions(+)
diff --git a/helm/seata-server/Chart.yaml b/helm/seata-server/Chart.yaml
new file mode 100644
index 0000000..38d37fd
--- /dev/null
+++ b/helm/seata-server/Chart.yaml
@@ -0,0 +1,47 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: v2
+name: seata-server
+description: A Helm chart for deploying Apache Seata Server on Kubernetes
+type: application
+version: 1.0.0
+appVersion: "2.0.0"
+
+# Chart metadata
+home: https://seata.apache.org/
+sources:
+ - https://github.com/apache/incubator-seata-k8s
+ - https://github.com/seata/seata
+maintainers:
+ - name: Seata Community
+ email: [email protected]
+keywords:
+ - seata
+ - distributed-transaction
+ - kubernetes
+categories:
+ - Database
+ - Middleware
+license: Apache-2.0
+
+# Chart dependencies
+dependencies: []
+
+# Icon URL (optional)
+icon: https://avatars.githubusercontent.com/u/63743798?s=200&v=4
+
diff --git a/helm/seata-server/README.md b/helm/seata-server/README.md
new file mode 100644
index 0000000..573ef80
--- /dev/null
+++ b/helm/seata-server/README.md
@@ -0,0 +1,246 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+# Seata Server Helm Chart
+
+一个用于在 Kubernetes 上部署 Apache Seata Server 的 Helm Chart。
+
+## 前置要求
+
+- Kubernetes 1.16+
+- Helm 3+
+- 如果使用 Cluster 模式,需要安装 seata-k8s operator
+
+## 快速开始
+
+### 1. 使用默认配置安装
+
+```bash
+helm install seata-server ./seata-server
+```
+
+### 2. 使用自定义命名空间安装
+
+```bash
+helm install seata-server ./seata-server -n seata --create-namespace
+```
+
+### 3. 使用自定义值安装
+
+```bash
+helm install seata-server ./seata-server -f values.yaml
+```
+
+## 配置
+
+### 部署模式
+
+#### Cluster 模式(推荐)
+
+使用 SeataServer CRD 和 seata-k8s operator 进行部署:
+
+```bash
+helm install seata-server ./seata-server \
+ --set seataServer.mode=cluster \
+ --set seataServer.replicas=3
+```
+
+#### Standalone 模式
+
+使用 Kubernetes Deployment 直接部署:
+
+```bash
+helm install seata-server ./seata-server \
+ --set seataServer.mode=standalone \
+ --set seataServer.replicas=1
+```
+
+### 常用配置参数
+
+| 参数 | 默认值 | 说明 |
+|------|--------|------|
+| `seataServer.mode` | cluster | 部署模式:cluster 或 standalone |
+| `seataServer.replicas` | 3 | 副本数 |
+| `seataServer.image.tag` | latest | 镜像标签 |
+| `seataServer.persistence.size` | 5Gi | 持久化存储大小 |
+| `seataServer.service.type` | ClusterIP | Service 类型 |
+| `seataServer.nodePort.enabled` | false | 是否启用 NodePort |
+| `secret.password` | seata123456 | Seata 控制台密码 |
+
+### 完整配置示例
+
+```yaml
+# 集群模式配置
+seataServer:
+ mode: cluster
+ replicas: 3
+ image:
+ repository: apache/seata-server
+ tag: latest
+ persistence:
+ enabled: true
+ size: 10Gi
+ reclaimPolicy: Retain
+ resources:
+ requests:
+ cpu: 200m
+ memory: 512Mi
+ limits:
+ cpu: 1000m
+ memory: 1Gi
+
+# 启用 NodePort
+seataServer:
+ nodePort:
+ enabled: true
+ ports:
+ service: 30091
+ console: 30092
+```
+
+## 使用示例
+
+### 示例 1:使用默认配置(Cluster 模式)
+
+```bash
+helm install seata-server ./seata-server
+```
+
+### 示例 2:使用 NodePort 访问
+
+```bash
+helm install seata-server ./seata-server \
+ --set seataServer.nodePort.enabled=true
+```
+
+### 示例 3:使用自定义密码和存储
+
+```bash
+helm install seata-server ./seata-server \
+ --set secret.password=my-secret-password \
+ --set seataServer.persistence.size=20Gi
+```
+
+### 示例 4:使用 Standalone 模式
+
+```bash
+helm install seata-server ./seata-server \
+ --set seataServer.mode=standalone \
+ --set seataServer.replicas=1
+```
+
+## 常用命令
+
+### 查看部署状态
+
+```bash
+# 查看 SeataServer 资源
+helm list
+kubectl get seataserver
+
+# 查看 Pod 状态
+kubectl get pods -l app=seata-server
+
+# 查看服务
+kubectl get service seata-server-cluster
+```
+
+### 升级发行版
+
+```bash
+helm upgrade seata-server ./seata-server \
+ --set seataServer.replicas=5
+```
+
+### 卸载发行版
+
+```bash
+helm uninstall seata-server
+```
+
+### 查看生成的清单
+
+```bash
+helm template seata-server ./seata-server
+helm template seata-server ./seata-server -f custom-values.yaml
+```
+
+### 验证配置
+
+```bash
+helm lint ./seata-server
+```
+
+## 访问 Seata Console
+
+### ClusterIP 模式
+
+```bash
+kubectl port-forward svc/seata-server-cluster 7091:7091
+
+# 访问: http://localhost:7091
+```
+
+### NodePort 模式
+
+```bash
+kubectl get nodes -o wide
+# 使用 NodePort 和 Node IP 访问: http://<node-ip>:30092
+```
+
+## 故障排查
+
+### 查看 Pod 日志
+
+```bash
+kubectl logs -f pod/seata-server-0
+```
+
+### 查看事件
+
+```bash
+kubectl describe seataserver seata-server
+kubectl get events
+```
+
+### 查看 Status
+
+```bash
+kubectl get seataserver seata-server -o yaml | grep status -A 10
+```
+
+## 卸载
+
+```bash
+helm uninstall seata-server -n <namespace>
+```
+
+## 相关文档
+
+- [Apache Seata 官方文档](https://seata.apache.org/)
+- [seata-k8s GitHub 仓库](https://github.com/apache/incubator-seata-k8s)
+- [Helm 文档](https://helm.sh/docs/)
+
+## 许可证
+
+Apache License 2.0
+
+## 社区支持
+
+- [Seata GitHub Issues](https://github.com/seata/seata/issues)
+- [Seata Community](https://seata.apache.org/community)
+
diff --git a/helm/seata-server/templates/NOTES.txt
b/helm/seata-server/templates/NOTES.txt
new file mode 100644
index 0000000..6dc98aa
--- /dev/null
+++ b/helm/seata-server/templates/NOTES.txt
@@ -0,0 +1,55 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+ {{- range $host := .Values.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
+ {{- end }}
+ {{- end }}
+{{- else if contains "NodePort" .Values.seataServer.service.type }}
+ export NODE_PORT=$(kubectl get services {{ include "seata-server.fullname" .
}} -n {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}")
+ export NODE_IP=$(kubectl get nodes -o
jsonpath="{.items[0].status.addresses[?(@.type=='ExternalIP')].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.seataServer.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status by running 'kubectl get --namespace {{
.Release.Namespace }} svc -w {{ include "seata-server.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
include "seata-server.fullname" . }} --template "{{"{{ range (index
.status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+ echo http://$SERVICE_IP:{{ .Values.seataServer.service.ports.console.port }}
+{{- else if contains "ClusterIP" .Values.seataServer.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l
"app.kubernetes.io/name={{ include "seata-server.name" .
}},app.kubernetes.io/instance={{ .Release.Name }}" -o
jsonpath="{.items[0].metadata.name}")
+ kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{
.Values.seataServer.service.ports.console.port }}:{{
.Values.seataServer.service.ports.console.port }}
+ echo "Visit http://127.0.0.1:{{
.Values.seataServer.service.ports.console.port }}"
+{{- end }}
+
+2. Access Seata Console:
+ - Username: {{ .Values.seataServer.env | first }}
+ - Password: Check the secret {{ .Values.secret.name }}
+ kubectl get secret {{ .Values.secret.name }} -n {{ .Release.Namespace }}
-o jsonpath='{.data.password}' | base64 -d
+
+3. Monitor the deployment:
+ kubectl get seataserver -n {{ .Release.Namespace }}
+ kubectl get pods -n {{ .Release.Namespace }} -l app=seata-server
+
+4. Check logs:
+ kubectl logs -f deployment/seata-server -n {{ .Release.Namespace }}
+
+For more information, visit:
+- https://seata.apache.org/
+- https://github.com/apache/incubator-seata-k8s
+
diff --git a/helm/seata-server/templates/_helpers.tpl
b/helm/seata-server/templates/_helpers.tpl
new file mode 100644
index 0000000..73d860a
--- /dev/null
+++ b/helm/seata-server/templates/_helpers.tpl
@@ -0,0 +1,94 @@
+{{/*
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+Expand the name of the chart.
+*/}}
+{{- define "seata-server.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+*/}}
+{{- define "seata-server.fullname" -}}
+{{- if .Values.fullnameOverride }}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- $name := default .Chart.Name .Values.nameOverride }}
+{{- if contains $name .Release.Name }}
+{{- .Release.Name | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "seata-server.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 |
trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "seata-server.labels" -}}
+helm.sh/chart: {{ include "seata-server.chart" . }}
+{{ include "seata-server.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "seata-server.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "seata-server.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+app: {{ .Values.labels.app }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "seata-server.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "seata-server.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
+
+{{/*
+Render environment variables
+*/}}
+{{- define "seata-server.env" -}}
+{{- range .Values.seataServer.env }}
+- name: {{ .name }}
+ {{- if .value }}
+ value: {{ .value | quote }}
+ {{- else if .valueFrom }}
+ valueFrom:
+ {{- toYaml .valueFrom | nindent 4 }}
+ {{- end }}
+{{- end }}
+{{- end }}
+
diff --git a/helm/seata-server/templates/deployment.yaml
b/helm/seata-server/templates/deployment.yaml
new file mode 100644
index 0000000..fc16e78
--- /dev/null
+++ b/helm/seata-server/templates/deployment.yaml
@@ -0,0 +1,98 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if eq .Values.seataServer.mode "standalone" }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ .Values.seataServer.name }}
+ namespace: {{ .Values.global.namespace }}
+ labels:
+ {{- include "seata-server.labels" . | nindent 4 }}
+ annotations:
+ {{- with .Values.annotations }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.seataServer.replicas }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- include "seata-server.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ {{- include "seata-server.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- if .Values.podAntiAffinity.enabled }}
+ affinity:
+ podAntiAffinity:
+ {{- if eq .Values.podAntiAffinity.type "required" }}
+ requiredDuringSchedulingIgnoredDuringExecution:
+ {{- else }}
+ preferredDuringSchedulingIgnoredDuringExecution:
+ {{- end }}
+ - labelSelector:
+ matchExpressions:
+ - key: app.kubernetes.io/name
+ operator: In
+ values:
+ - {{ include "seata-server.name" . }}
+ topologyKey: {{ .Values.podAntiAffinity.topologyKey }}
+ {{- end }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: seata-server
+ image: {{ .Values.seataServer.image.repository }}:{{
.Values.seataServer.image.tag }}
+ imagePullPolicy: {{ .Values.seataServer.image.pullPolicy }}
+ ports:
+ - name: service
+ containerPort: {{ .Values.seataServer.ports.service }}
+ protocol: TCP
+ - name: console
+ containerPort: {{ .Values.seataServer.ports.console }}
+ protocol: TCP
+ env:
+ {{- include "seata-server.env" . | nindent 12 }}
+ resources:
+ {{- toYaml .Values.seataServer.resources | nindent 12 }}
+ livenessProbe:
+ httpGet:
+ path: /
+ port: console
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 3
+ readinessProbe:
+ httpGet:
+ path: /
+ port: console
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 3
+{{- end }}
+
diff --git a/helm/seata-server/templates/seataserver.yaml
b/helm/seata-server/templates/seataserver.yaml
new file mode 100644
index 0000000..e0ddb0f
--- /dev/null
+++ b/helm/seata-server/templates/seataserver.yaml
@@ -0,0 +1,77 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if eq .Values.seataServer.mode "cluster" }}
+apiVersion: operator.seata.apache.org/v1
+kind: SeataServer
+metadata:
+ name: {{ .Values.seataServer.name }}
+ namespace: {{ .Values.global.namespace }}
+ labels:
+ {{- include "seata-server.labels" . | nindent 4 }}
+ annotations:
+ {{- with .Values.annotations }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ # Service name
+ serviceName: {{ .Values.seataServer.service.name }}
+
+ # Number of replicas
+ replicas: {{ .Values.seataServer.replicas }}
+
+ # Container image
+ image: {{ .Values.seataServer.image.repository }}:{{
.Values.seataServer.image.tag }}
+ imagePullPolicy: {{ .Values.seataServer.image.pullPolicy }}
+
+ # Container name
+ containerName: seata-server
+
+ # Port configuration
+ ports:
+ consolePort: {{ .Values.seataServer.ports.console }}
+ servicePort: {{ .Values.seataServer.ports.service }}
+ raftPort: {{ .Values.seataServer.ports.raft }}
+
+ # Persistence configuration
+ persistence:
+ volumeReclaimPolicy: {{ .Values.seataServer.persistence.reclaimPolicy }}
+ spec:
+ accessModes:
+ - {{ .Values.seataServer.persistence.accessMode }}
+ {{- if .Values.seataServer.persistence.storageClassName }}
+ storageClassName: {{ .Values.seataServer.persistence.storageClassName }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.seataServer.persistence.size }}
+
+ # Storage configuration
+ store:
+ resources:
+ requests:
+ storage: {{ .Values.seataServer.persistence.size }}
+
+ # Resource configuration
+ resources:
+ {{- toYaml .Values.seataServer.resources | nindent 4 }}
+
+ # Environment variables
+ env:
+ {{- include "seata-server.env" . | nindent 4 }}
+{{- end }}
+
diff --git a/helm/seata-server/templates/secret.yaml
b/helm/seata-server/templates/secret.yaml
new file mode 100644
index 0000000..a07b5ac
--- /dev/null
+++ b/helm/seata-server/templates/secret.yaml
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+{{- if .Values.secret.create }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ .Values.secret.name }}
+ namespace: {{ .Values.global.namespace }}
+ labels:
+ {{- include "seata-server.labels" . | nindent 4 }}
+type: Opaque
+stringData:
+ password: {{ .Values.secret.password | quote }}
+{{- end }}
+
diff --git a/helm/seata-server/templates/service.yaml
b/helm/seata-server/templates/service.yaml
new file mode 100644
index 0000000..a02406a
--- /dev/null
+++ b/helm/seata-server/templates/service.yaml
@@ -0,0 +1,52 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Values.seataServer.service.name }}
+ namespace: {{ .Values.global.namespace }}
+ labels:
+ {{- include "seata-server.labels" . | nindent 4 }}
+ annotations:
+ {{- with .Values.annotations }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ if .Values.seataServer.nodePort.enabled }}{{
.Values.seataServer.nodePort.type }}{{ else }}{{
.Values.seataServer.service.type }}{{ end }}
+ selector:
+ {{- include "seata-server.selectorLabels" . | nindent 4 }}
+ ports:
+ - name: service
+ port: {{ .Values.seataServer.service.ports.service.port }}
+ targetPort: {{ .Values.seataServer.service.ports.service.targetPort }}
+ protocol: {{ .Values.seataServer.service.ports.service.protocol }}
+ {{- if and .Values.seataServer.nodePort.enabled (eq
.Values.seataServer.service.type "NodePort") }}
+ nodePort: {{ .Values.seataServer.nodePort.ports.service }}
+ {{- end }}
+ - name: console
+ port: {{ .Values.seataServer.service.ports.console.port }}
+ targetPort: {{ .Values.seataServer.service.ports.console.targetPort }}
+ protocol: {{ .Values.seataServer.service.ports.console.protocol }}
+ {{- if and .Values.seataServer.nodePort.enabled (eq
.Values.seataServer.service.type "NodePort") }}
+ nodePort: {{ .Values.seataServer.nodePort.ports.console }}
+ {{- end }}
+ - name: raft
+ port: {{ .Values.seataServer.service.ports.raft.port }}
+ targetPort: {{ .Values.seataServer.service.ports.raft.targetPort }}
+ protocol: {{ .Values.seataServer.service.ports.raft.protocol }}
+
diff --git a/helm/seata-server/values-cluster.yaml
b/helm/seata-server/values-cluster.yaml
new file mode 100644
index 0000000..186aa34
--- /dev/null
+++ b/helm/seata-server/values-cluster.yaml
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Seata Server Helm Chart - Cluster Mode Values
+
+seataServer:
+ mode: cluster
+ replicas: 3
+ image:
+ repository: apache/seata-server
+ tag: latest
+ pullPolicy: IfNotPresent
+
+ resources:
+ requests:
+ cpu: 200m
+ memory: 512Mi
+ limits:
+ cpu: 500m
+ memory: 1Gi
+
+ persistence:
+ enabled: true
+ size: 5Gi
+ reclaimPolicy: Retain
+
+ service:
+ type: ClusterIP
+
+# 高可用配置
+podAntiAffinity:
+ enabled: true
+ type: preferred
+ topologyKey: kubernetes.io/hostname
+
diff --git a/helm/seata-server/values-standalone.yaml
b/helm/seata-server/values-standalone.yaml
new file mode 100644
index 0000000..9cde3c4
--- /dev/null
+++ b/helm/seata-server/values-standalone.yaml
@@ -0,0 +1,66 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Seata Server Helm Chart - Standalone Mode Values
+
+seataServer:
+ mode: standalone
+ replicas: 1
+ image:
+ repository: apache/seata-server
+ tag: latest
+ pullPolicy: IfNotPresent
+
+ resources:
+ requests:
+ cpu: 100m
+ memory: 256Mi
+ limits:
+ cpu: 500m
+ memory: 512Mi
+
+ persistence:
+ enabled: false # Standalone 通常不需要持久化
+
+ service:
+ type: ClusterIP
+
+ # 启用 NodePort 以便从集群外访问
+ nodePort:
+ enabled: true
+ type: NodePort
+ ports:
+ service: 30091
+ console: 30092
+
+# 环境变量
+seataServer:
+ env:
+ - name: console.user.username
+ value: seata
+ - name: console.user.password
+ valueFrom:
+ secretKeyRef:
+ name: seata-credentials
+ key: password
+ - name: store.mode
+ value: file
+ - name: server.port
+ value: "7091"
+ - name: server.servicePort
+ value: "8091"
+
diff --git a/helm/seata-server/values.yaml b/helm/seata-server/values.yaml
new file mode 100644
index 0000000..c9bbc67
--- /dev/null
+++ b/helm/seata-server/values.yaml
@@ -0,0 +1,199 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Default values for seata-server Helm chart
+
+# Global configuration
+global:
+ namespace: default
+
+# Seata Server configuration
+seataServer:
+ # Deployment name
+ name: seata-server
+
+ # Deployment mode: cluster or standalone
+ # cluster: Use SeataServer CRD (requires seata-k8s operator)
+ # standalone: Use Deployment directly
+ mode: cluster
+
+ # Image configuration
+ image:
+ repository: apache/seata-server
+ tag: latest
+ pullPolicy: IfNotPresent
+
+ # Replica configuration
+ replicas: 3
+
+ # Service configuration
+ service:
+ name: seata-server-cluster
+ type: ClusterIP
+ ports:
+ service:
+ port: 8091
+ targetPort: 8091
+ protocol: TCP
+ name: service
+ console:
+ port: 7091
+ targetPort: 7091
+ protocol: TCP
+ name: console
+ raft:
+ port: 9091
+ targetPort: 9091
+ protocol: TCP
+ name: raft
+
+ # NodePort Service (for standalone mode)
+ nodePort:
+ enabled: false
+ type: NodePort
+ ports:
+ service: 30091
+ console: 30092
+
+ # Resource configuration
+ resources:
+ requests:
+ cpu: 100m
+ memory: 256Mi
+ limits:
+ cpu: 500m
+ memory: 512Mi
+
+ # Persistence configuration
+ persistence:
+ enabled: true
+ storageClassName: "" # Leave empty to use default
+ accessMode: ReadWriteOnce
+ size: 5Gi
+ # Volume reclaim policy: Delete or Retain
+ reclaimPolicy: Retain
+
+ # Ports configuration
+ ports:
+ console: 7091
+ service: 8091
+ raft: 9091
+
+ # Environment variables
+ env:
+ # Console credentials
+ - name: console.user.username
+ value: seata
+ - name: console.user.password
+ valueFrom:
+ secretKeyRef:
+ name: seata-credentials
+ key: password
+ # Store configuration
+ - name: store.mode
+ value: raft
+ - name: server.port
+ value: "7091"
+ - name: server.servicePort
+ value: "8091"
+
+# Secret configuration
+secret:
+ # Create secret automatically
+ create: true
+ # Secret name
+ name: seata-credentials
+ # Password value (base64 encoded in Kubernetes)
+ password: seata123456
+
+# PodSecurityPolicy configuration
+podSecurityPolicy:
+ enabled: false
+
+# Network Policy configuration
+networkPolicy:
+ enabled: false
+
+# Ingress configuration
+ingress:
+ enabled: false
+ className: ""
+ annotations: {}
+ # kubernetes.io/ingress.class: nginx
+ # cert-manager.io/cluster-issuer: letsencrypt-prod
+ hosts:
+ - host: seata.example.com
+ paths:
+ - path: /
+ pathType: Prefix
+ tls: []
+ # - secretName: seata-tls
+ # hosts:
+ # - seata.example.com
+
+# Monitoring and logging
+monitoring:
+ enabled: false
+ serviceMonitor:
+ enabled: false
+ interval: 30s
+
+# Autoscaling configuration (for standalone mode)
+autoscaling:
+ enabled: false
+ minReplicas: 2
+ maxReplicas: 5
+ targetCPUUtilizationPercentage: 80
+ targetMemoryUtilizationPercentage: 80
+
+# Pod Disruption Budget configuration
+podDisruptionBudget:
+ enabled: false
+ minAvailable: 1
+ # maxUnavailable: 1
+
+# Node affinity configuration
+nodeAffinity:
+ enabled: false
+ requiredDuringSchedulingIgnoredDuringExecution: []
+ preferredDuringSchedulingIgnoredDuringExecution: []
+
+# Pod affinity configuration
+podAffinity:
+ enabled: false
+
+# Pod anti-affinity configuration
+podAntiAffinity:
+ enabled: false
+ type: preferred # preferred or required
+ topologyKey: kubernetes.io/hostname
+
+# Tolerations
+tolerations: []
+
+# Node selector
+nodeSelector: {}
+
+# Labels
+labels:
+ app: seata-server
+ version: v1
+
+# Annotations
+annotations:
+ operator.seata.apache.org/managed: "true"
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]