apiVersion: v1
kind: Pod
metadata:
  labels:
    app: milvus-e2e
spec:
  enableServiceLinks: false
  containers:
  - name: main
    image: milvusdb/krte:20210722-806d13f
    env:
    - name: DOCKER_IN_DOCKER_ENABLED
      value: "true"
    - name: DOCKER_VOLUME_DIRECTORY
      value: "/mnt/disk/.docker"
    - name: KRTE_POD_IP
      valueFrom:
        fieldRef:
          fieldPath: status.podIP
    securityContext:
      privileged: true
    tty: true
    args: ["cat"]
    resources:
      limits:
        cpu: "6"
        memory: 12Gi
        ephemeral-storage: "100Gi"
      requests:
        cpu: "2"
        memory: 10Gi
        ephemeral-storage: "100Gi"
    volumeMounts:
    - mountPath: /docker-graph
      name: docker-graph
    - mountPath: /var/lib/docker
      name: docker-root
    - mountPath: /lib/modules
      name: modules
      readOnly: true
    - mountPath: /sys/fs/cgroup
      name: cgroup
    - mountPath: /mnt/disk/.docker
      name: build-cache
      subPath: docker-volume
  - name: etcd
    image: quay.io/coreos/etcd:v3.5.0
    env:
    - name: ETCD_LOG_LEVEL
      value: debug
    - name: ETCD_LOGGER
      value: zap
    - name: ETCD_QUOTA_BACKEND_BYTES
      value: "4294967296"
    - name: ETCD_AUTO_COMPACTION_MODE
      value: "revision"
    - name: ETCD_AUTO_COMPACTION_RETENTION
      value: "1000"
    - name: ETCD_SNAPSHOT_COUNT
      value: "10000"
    - name: GODEBUG
      value: "gctrace=1"
    command:
    - etcd
    - -advertise-client-urls=http://127.0.0.1:2379
    - -listen-client-urls=http://0.0.0.0:2379
    resources:
      limits:
        cpu: "2"
        memory: "6Gi"
      requests:
        cpu: "1"
        memory: "4Gi"
    ports:
    - containerPort: 2379
      name: client
      protocol: TCP
  volumes:
  - emptyDir: {}
    name: docker-graph
  - emptyDir: {}
    name: docker-root
  - hostPath:
      path: /tmp/krte/cache
      type: DirectoryOrCreate
    name: build-cache
  - hostPath:
      path: /lib/modules
      type: Directory
    name: modules
  - hostPath:
      path: /sys/fs/cgroup
      type: Directory
    name: cgroup
  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: jenkins/label
            operator: In
            values:
            - milvus-e2e-test-kind-nightly
        topologyKey: kubernetes.io/hostname
