kind: Pod
apiVersion: v1
metadata:
  name: ottcache-003
  namespace: zxcdn
  labels:
    pod: ottcache-003
  annotations:
    k8s.v1.cni.cncf.io/networks: '
    [{
      "name": "ottcache-003-macvlan", 
      "default-route": ["39.137.101.126"] 
    }]'
spec:
  nodeSelector:
    kubernetes.io/hostname: 'worker-0.ocpsc.redhat.ren'
  restartPolicy: Always
  containers:
    - name: ottcache-003-main
      image: registry.redhat.ren:4443/zteadm/ottcache-img:6.01.05.01T03
      imagePullPolicy: IfNotPresent
      command: ["/usr/sbin/init"]        
      volumeMounts:
        - name: init-config-volumes
          mountPath: /home/init/init.conf  
          subPath: init.conf        
        - name: init-config-volumes
          mountPath: /home/zte_node/log_exporter/ztetool.ini 
          subPath: ztetool.ini            
        - name: dshm
          mountPath: /dev/shm           
        - name: host-time
          mountPath: /etc/localtime      
        - name: host-resolv
          mountPath: /etc/resolv.conf
        #- name: host-zoneinfo
        #  mountPath: /usr/share/zoneinfo
        - name: ottcache-config-volumes
          mountPath: /home/persistence
        - name: ottcache-redis-db-volumes
          mountPath: /home/zxcdn/ottcache/redis/db
        - name: ottcache-nginx-log-volumes
          mountPath: /home/zxcdn/ottcache/nginx/logs
        - name: ottcache-tomcat-log-volumes
          mountPath: /home/zxcdn/ottcache/tomcat/logs/
        - name: zxagent-log-volumes
          mountPath: /home/zxagent/log
        - name: logexporter-log-volumes
          mountPath: /home/zte_node/log/
        - name: ottcache-mnt-zxdfs-volumes
          mountPath: /mnt/zxdfs    
      #livenessProbe:
      #   httpGet:
      #     path: /GetCDNLoadInfoAll
      #     port: 6610
      #   initialDelaySeconds: 60
      #   periodSeconds: 30
      resources:
        requests:
          cpu: 8.0
          memory: 64Gi
        limits:
          cpu: 8.0
          memory: 64Gi
      securityContext:
        privileged: true
    - name: ottcache-003-pg
      image: registry.redhat.ren:4443/zteadm/pg-img:v1.01.01.01
      imagePullPolicy: IfNotPresent
      env:
      - name: ROOTPATH
        value: "/mnt"
      command: [ "/home/start.sh" ]
      volumeMounts:
        - name: pg-root
          mountPath: /mnt
        - name: host-time
          mountPath: /etc/localtime
        - name: host-resolv
          mountPath: /etc/resolv.conf
        #- name: host-zoneinfo
        #  mountPath: /usr/share/zoneinfo
      resources:
        requests:
          cpu: 1.0
          memory: 8Gi
        limits:
          cpu: 1.0
          memory: 8Gi
      securityContext:
        privileged: true
  serviceAccount: zxcdn-app
  volumes:
      - name: init-config-volumes
        configMap:
          name: ottcache-003-config
      - name: dshm
        emptyDir:
          medium: Memory
      - name: host-time
        hostPath:
          path: /etc/localtime
      - name: host-resolv
        hostPath:
          path: /etc/resolv.conf
      #- name: host-zoneinfo
      #  hostPath:
      #    path: /usr/share/zoneinfo
      - name: ottcache-config-volumes
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/config
      - name: ottcache-redis-db-volumes
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/redis/db
      - name: ottcache-nginx-log-volumes
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/nginx/logs
      - name: ottcache-tomcat-log-volumes
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/tomcat/logs
      - name: sshd-log-volumes
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/sshd/logs
      - name: zxagent-log-volumes
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/zxagent/logs
      - name: logexporter-log-volumes
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/logexporter/logs
      - name: ottcache-mnt-zxdfs-volumes
        hostPath:
          path: /data/mnt/zxdfs
      - name: pg-root
        hostPath:
          path: /data/ztecdn/pod-ottcache-003/pg/data
