apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    origin: diss
    app: diss-backend
  name: diss-backend
  namespace: diss
spec:
  replicas: 1
  selector:
    matchLabels:
      origin: diss
      app: diss-backend
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        origin: diss
        app: diss-backend
    spec:
      containers:
      - command:
        - ./entrypoint.sh
        image: registry.cn-qingdao.aliyuncs.com/diss/diss-backend
        imagePullPolicy: IfNotPresent
        name: diss-backend
        ports:
        - containerPort: 8080
        - containerPort: 10443
        - containerPort: 8889
        readinessProbe:
          failureThreshold: 6
          httpGet:
            path: /swagger
            port: 10443
            scheme: HTTPS
          initialDelaySeconds: 30
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 5
        resources:
          requests:
            cpu: 300m
            memory: 512Mi
        volumeMounts:
        - name: appconf
          mountPath: /opt/diss-backend/conf/app.conf
          subPath: app.conf
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      volumes:
        - name: appconf
          configMap:
            name: diss-backend-app-conf
      restartPolicy: Always
