
apiVersion: batch/v1
kind: CronJob
metadata:
  name: tu-tradecaledar-v1x0x1
spec:
  schedule: "0 1 * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      ttlSecondsAfterFinished: 100
      template:
        spec:
          hostAliases:
            - ip: "172.16.0.5"
              hostnames:
                - "api-glb.daline.com.cn"
          containers:
          - name: tu-tradecaledar-v1x0x1
            image: dockerhub.daline.com.cn/tu_tradecaledar_3a18889:1.0.1
            volumeMounts:
              - name: nfs-store
                mountPath: /var/store/nfs
              - name: nfs-store-author
                mountPath: /var/store/nfs_author
              - name: http-store
                mountPath: /var/store/http
              - name: localtime
                mountPath: /etc/localtime
                readOnly: true
            env:
              - name: "TZ"
                value: "Asia/Shanghai"
              - name: "IN_K8S"
                value: "1"
              - name: "AUTHOR"
                value: "kun.z"
              - name: "GIT_COMMIT"
                value: "3a188891b3fb5c7552fe060e02f20f815cb4cb0a"
              - name: "DAL_ENV"
                value: "dev"
              - name: "DAL_SPACE"
                value: "westfutu"
              # log config
              - name: "LOG_LEVEL"
                value: "info"
              - name: "LOG_DIR"
                value: "/var/log/daline"
              # file storage config
              - name: "TEMP_FOLDER"
                value: "/tmp/"
              - name: "NFS_FOLDER"
                value: "/var/store/nfs/"
              - name: "NFS_FOLDER_AUTHOR"
                value: "/var/store/nfs_author/"
              - name: "HTTP_FOLDER"
                value: "/var/store/http/"
              - name: "HTTP_BASE_URL"
                value: "/httpstore/dev/westfutu/kun.z/tu_tradecaledar/1_0_1/"
          restartPolicy: Never
          volumes:
            - name: nfs-store
              nfs:
                server: 369df4abd8-qmf27.cn-shanghai.nas.aliyuncs.com
                path: "/home/NFSData/dev/westfutu/kun.z/tu_tradecaledar/1_0_1/"
            - name: nfs-store-author
              nfs:
                server: 369df4abd8-qmf27.cn-shanghai.nas.aliyuncs.com
                path: "/home/NFSData/dev/westfutu/kun.z/"
            - name: http-store
              nfs:
                server: 369df4abd8-qmf27.cn-shanghai.nas.aliyuncs.com
                path: "/home/NFSData/FileServer/files/dev/westfutu/kun.z/tu_tradecaledar/1_0_1/"
            - name: localtime
              hostPath:
                path: "/etc/localtime"

