apiVersion: v1
kind: Pod
metadata:
  name: pod-name
  namespace: namespace-name
  labels:
    user: CICV
spec:
  nodeName: node-name
  dnsPolicy: None
  dnsConfig:
    nameservers:
      - 10.16.11.1
      - 10.16.11.2
  hostAliases:
    - ip: 10.14.85.239
      hostnames:
        - simulation004
    - ip: 10.14.85.237
      hostnames:
        - gpu001
  initContainers:
    - name: init
      image: algorithm-image
      imagePullPolicy: Always
      command: ['sh', '-c', 'echo algorithm image downloaded && sleep 2']
  containers:
    - name: vtd-container
      image: vtd-image
      imagePullPolicy: Always
      command: [ "/Controller/VTDController", "vtd-command", "kafka-topic" ]
      resources:
        limits:
          nvidia.com/gpu: 1
      env:
        - name: PodName
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: LM_LICENSE_FILE
          value: 27500@10.14.85.247
        - name: PLATFORM_IP
          value: platform-ip
        - name: OSS_TYPE
          value: oss-type
        - name: OSS_IP
          value: oss-ip
        - name: OSS_ACCESS_KEY
          value: oss-access-key
        - name: OSS_SECRET_KEY
          value: oss-secret-key
        - name: OSS_BUCKET_NAME
          value: oss-bucket
        - name: KAFKA_IP
          value: kafka-ip
        - name: KAFKA_PARTITION
          value: kafka-partition
        - name: KAFKA_OFFSET
          value: kafka-offset
        - name: CPU_ORDER
          value: cpu-order
    - name: algorithm-container
      image: algorithm-image
      imagePullPolicy: Never
      command: [ "/bin/sh", "-c", "/run.sh; touch /tmp/hello.txt;while true;do /bin/echo $(date +%T) >> /tmp/hello.txt; sleep 600; done;" ]
  restartPolicy: Never
