kind: Deployment
apiVersion: apps/v1
metadata:
  name: seata-v1
  namespace: health-examination-api
  labels:
    app: seata
    version: v1
  annotations:
    deployment.kubernetes.io/revision: '8'
    kubesphere.io/creator: project-admin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: seata
      version: v1
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: seata
        version: v1
      annotations:
        kubesphere.io/restartedAt: '2021-06-08T10:00:01.089Z'
        logging.kubesphere.io/logsidecar-config: '{}'
    spec:
      volumes:
        - name: volume-syfmi2
          configMap:
            name: seata-server-config
            defaultMode: 420
      containers:
        - name: seata
          image: 'seataio/seata-server:1.3.0'
          ports:
            - name: http-8091
              containerPort: 8091
              protocol: TCP
          env:
            - name: SEATA_CONFIG_NAME
              value: 'file:/root/seata-config/registry'
          resources:
            limits:
              cpu: 500m
              memory: 500Mi
          volumeMounts:
            - name: volume-syfmi2
              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
---


kind: Service
apiVersion: v1
metadata:
  name: seata
  namespace: health-examination-api
  labels:
    app: seata
    version: v1
  annotations:
    kubesphere.io/creator: project-admin
    kubesphere.io/serviceType: statelessservice
spec:
  ports:
    - name: http-8091
      protocol: TCP
      port: 8091
      targetPort: 8091
  selector:
    app: seata
  clusterIP: 10.233.52.13
  type: ClusterIP
  sessionAffinity: None

---

kind: ConfigMap
apiVersion: v1
metadata:
  name: seata-server-config
  namespace: health-examination-api
  annotations:
    kubesphere.io/creator: project-admin
data:
  registry.conf: |
    registry {
        type = "nacos"
        nacos {
          group="SEATA_GROUP"
          namespace ="public"
          application = "seata-server"
          serverAddr = "nacos.health-examination-api.172.30.42.196.nip.io:30328"
        }
    }
    config {
      type = "nacos"
      nacos {
        serverAddr = "nacos.health-examination-api.172.30.42.196.nip.io:30328"
        group="SEATA_GROUP"
        namespace="public"
      }
    }

 

Logo

开源、云原生的融合云平台

更多推荐