kind: ConfigMap
apiVersion: v1
metadata:
name: seata-server-config
namespace: kp-dev
annotations:
kubesphere.io/alias-name: seata-server-config
kubesphere.io/creator: admin
data:
seata-server-config: |-
registry {
# file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
type = "nacos"
loadBalance = "RandomLoadBalance"
loadBalanceVirtualNodes = 10
nacos {
application = "seata-server"
serverAddr = "http://nacos.local.yjzhixue.com"
group = "SEATA_GROUP"
namespace = "kp-dev"
cluster = "default"
username = "nacos"
password = "123456"
}
}
config {
# file、nacos 、apollo、zk、consul、etcd3
type = "nacos"
nacos {
serverAddr = "http://nacos.local.yjzhixue.com"
namespace = "kp-dev"
group = "SEATA_GROUP"
cluster = "default"
username = "nacos"
password = "123456"
dataId = "seataServer.properties"
}
}
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: seata-server
namespace: kp-dev
labels:
app: seata-server
annotations:
deployment.kubernetes.io/revision: '6'
kubesphere.io/alias-name: seata-server
kubesphere.io/creator: xiaodx
spec:
replicas: 1
selector:
matchLabels:
app: seata-server
template:
metadata:
creationTimestamp: null
labels:
app: seata-server
annotations:
kubesphere.io/containerSecrets: ''
logging.kubesphere.io/logsidecar-config: '{}'
spec:
volumes:
- name: volume-1ahel5
configMap:
name: seata-server-config
items:
- key: seata-server-config
path: registry.conf
defaultMode: 420
containers:
- name: seata-server
image: 'docker.io/seataio/seata-server:1.4.2'
env:
- name: SEATA_CONFIG_NAME
value: 'file:/root/seata-config/registry'
resources: {}
volumeMounts:
- name: volume-1ahel5
readOnly: true
mountPath: /root/seata-config
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
serviceAccountName: default
serviceAccount: default
securityContext: {}
affinity: {}
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
注意:本文归作者所有,未经作者允许,不得转载