dxlance11 commented on issue #7371:
URL:
https://github.com/apache/incubator-seata/issues/7371#issuecomment-2911113356
> 用apache/seata-server 还有你什么配置信息都不提供,如何判断问题所在?
---
apiVersion: v1
kind: ConfigMap
metadata:
name: seata-server-config
namespace: seata
data:
application.yml: |
server:
port: 7091
console:
user:
username: seata
password: DJmB9b4M6Z
spring:
application:
name: seata-server
logging:
config: classpath:logback-spring.xml
file:
path: ${log.home:${user.home}/logs/seata}
seata:
server:
raft:
group: default
server-addr:
seata-server-0.seata-server.seata.svc.cluster.local:9091,seata-server-1.seata-server.seata.svc.cluster.local:9091,seata-server-2.seata-server.seata.svc.cluster.local:9091
snapshot-interval: 600
apply-batch: 32
max-append-bufferSize: 262144
max-replicator-inflight-msgs: 256
disruptor-buffer-size: 16384
election-timeout-ms: 1000
reporter-enabled: false
reporter-initial-delay: 60
serialization: jackson
compressor: none
sync: true
config:
type: file
registry:
type: file
store:
mode: raft
file:
dir: /seata/sessionStore
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
ignore:
urls:
/,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/version.json,/metadata/v1/**
---
apiVersion: v1
kind: Service
metadata:
name: seata-server
namespace: seata
labels:
app.kubernetes.io/name: seata-server
spec:
type: ClusterIP
clusterIP: None # 设置为Headless Service
ports:
- port: 8091
protocol: TCP
targetPort: 8091
name: http
- port: 7091
protocol: TCP
targetPort: 7091
name: web
- port: 9091
protocol: TCP
targetPort: 9091
name: raft
selector:
app.kubernetes.io/name: seata-server
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: seata-server
namespace: seata
labels:
app.kubernetes.io/name: seata-server
spec:
serviceName: seata-server
replicas: 3
selector:
matchLabels:
app.kubernetes.io/name: seata-server
template:
metadata:
labels:
app.kubernetes.io/name: seata-server
spec:
containers:
- name: seata-server
image: docker.io/apache/seata-server:2.4.0.jdk21
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: Asia/Shanghai
- name: SEATA_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
ports:
- name: http
containerPort: 8091
protocol: TCP
- name: console
containerPort: 7091
protocol: TCP
- name: raft
containerPort: 9091
protocol: TCP
volumeMounts:
- mountPath: /seata-server/resources/application.yml
name: seata-config
subPath: application.yml
- name: seata-data
mountPath: /seata/sessionStore
volumes:
- name: seata-config
configMap:
name: seata-server-config
volumeClaimTemplates:
- metadata:
name: seata-data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
storageClassName: local-hostpath
参照https://seata.apache.org/zh-cn/docs/ops/deploy-server-raft这个文档部署的,只有2.4的镜像可以部署成功。
客户端配置:
seata:
tx-service-group: default_tx_group
service:
vgroup-mapping:
default_tx_group: default
registry:
type: raft
raft:
server-addr:
seata-server-0.seata-server.seata.svc.cluster.local:7091,seata-server-1.seata-server.seata.svc.cluster.local:7091,seata-server-2.seata-server.seata.svc.cluster.local:7091
metadata-max-age-ms: 30000
username: seata
password: seata
tokenValidityInMilliseconds: 1740000
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]