apiVersion: apps/v1
kind: Deployment 
metadata:
  name: udcwebdav
  namespace: edoc2
  labels:
    app: udcwebdav
    k8s-app: udcwebdav
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: udcwebdav
  template:
    metadata:
      labels:
        app: udcwebdav
    spec:
      hostname: udcwebdav
      terminationGracePeriodSeconds: 60
      containers:
      - name: udcw-container
        image: registry.edoc2.com:5000/edoc2v5/udcwebdav:ecm-v6.6.0.0_arm
        imagePullPolicy: IfNotPresent
        envFrom:
        - configMapRef:
            name: ecm-envfile
        env:
        - name: ECMURL
          #value: "https://nginx"
          value: "http://172.16.4.50:30179"
        - name: UPLOADURL
          value: "http://udctransport:7878"
        - name: ECM_IntegrationKey
          value: "153e73fb-7be8-bef6-2ff5-d9793317f439"
        - name: RootFolderId
          value: "1"
        - name: EnableEcmAuth
          value: "true"
        #- name: AuthUsers
        #  #value: "yameng.kou|jun.shen|feiya.zhi|shangmeng.cai|deliang.zhang|zhanli.xuan|liwei.xu|lizheng"
        #  value: "yameng.kou|jun.shen|feiya.zhi|shangmeng.cai|deliang.zhang|zhanli.xuan|liwei.xu|lizheng|suiyi.yang|yuxiang.shen|zhifeng.wang|ziheng.yang|huan1.zhang1|yichi.zhang|tianwen.zhu|xiaojie.liu|ge.ren|zeyi.hang1|yijia.shi|qiyog.wei|lei.yang|yadan.hu|wanyuan.lv|wei.huang|mengying.jing|jiayi.li|han.zhang|zhanxia.zhao|chunya.zhao|shiliang.zhang|hanbing.li|yan.ran|mingke.yu|yan.dai|sijing.song|jie.you|guanghui.ju|liangliang.zhang|shanshan.wu|pengfei.fu|zikun.yang|maosheng.gui|yumei.wang|xiaoyan.liu|ning.ning|heng.zhang|yong.fang|yong.tian|daojin.an|jiantao.chen|yingying.peng"
        - name: RunMode
          value: "cluster"
        - name: FtpServerPort
          value: "38821"
        ports:
        - name: udcweb-7879
          containerPort: 7879
        securityContext:
          #fsGroup: 1000
          #runAsUser: 1000
          privileged: true
          capabilities:
            add: ["SYS_PTRACE"]
      restartPolicy: Always
      nodeSelector:
        node.drive.nodelabels: InDrive
---
apiVersion: v1
kind: Service
metadata:
  name: udcwebdav
  namespace: edoc2
  labels:
    app: udcwebdav
spec:
  #externalTrafficPolicy: Local
  ports:
  - name: udcweb-7879
    port: 7879
    targetPort: 7879
    nodePort: 31980
    protocol: TCP
  selector:
    app: udcwebdav
  #type: ClusterIP
  type: NodePort
