---
apiVersion: v1
kind: Service
metadata:
  name: isp
  namespace: edoc2
  labels:
    app: isp
spec:
  ports:
  - name: isp
    port: 80
    targetPort: 80
    protocol: TCP
  selector:
    app: isp
  type: ClusterIP
---
apiVersion: apps/v1
#kind: StatefulSet
kind: Deployment
metadata:
  name: isp
  namespace: edoc2
  labels:
    app: isp
    k8s-app: isp
spec:
  #serviceName: mysql
  selector:
    matchLabels:
      app: isp
  replicas: 1
  revisionHistoryLimit: 5
  template:
    metadata:
      labels:
        app: isp
    spec:
      hostname: isp
      terminationGracePeriodSeconds: 30
      containers:
      - name: isp-container
        image: registry.edoc2.com:5000/edoc2v5/isp:edrms-v6.5.0.1-rc16
        imagePullPolicy: IfNotPresent
        env:
        - name: DatabasePassword
          value: "Xjb0^DDy"
        - name: DatabaseServerName
          value: "middle-proxy"
        - name: DatabaseType
          value: "3"
        - name: DatabaseUserName
          value: "repl"
        - name: DatabaseServerPort
          value: "3306"
        - name: SslMode
          value: "Preferred"
        - name: ECMURL
          value: "http://nginx"
        - name: ESURL
          value: "http://es0:9200,http://es1:9200,http://es2:9200"
        - name: ECM_IntegrationKey
          value: "41b0a4c6-5b06-4276-8087-ecab3d983f16"
        - name: DEVCLOUDURL
          value: "http://www.macrowingcloud.com"
        - name: CONTAINER_PLATFORM
          value: "kubernetes"
        ports:
        - name: ispport
          containerPort: 80
          protocol: TCP
      restartPolicy: Always
      nodeSelector:
        node.labels.nodeisp: "true"
