apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: image-warmer
  namespace: production
spec:
  selector:
    matchLabels:
      name: image-warmer
  template:
    metadata:
      labels:
        name: image-warmer
    spec:
      automountServiceAccountToken: false
      dnsPolicy: ClusterFirst
      hostNetwork: true
      terminationGracePeriodSeconds: 0
      nodeSelector:
        karpenter.k8s.aws/instance-category: "g"
      tolerations:
      - operator: Exists
      - effect: NoSchedule
        key: nvidia.com/gpu
        operator: Exists
      - effect: NoExecute
        key: node.kubernetes.io/not-ready
        operator: Exists
      - effect: NoExecute
        key: node.kubernetes.io/unreachable
        operator: Exists
      - effect: NoSchedule
        key: node.kubernetes.io/disk-pressure
        operator: Exists
      - effect: NoSchedule
        key: node.kubernetes.io/memory-pressure
        operator: Exists
      - effect: NoSchedule
        key: node.kubernetes.io/pid-pressure
        operator: Exists
      - effect: NoSchedule
        key: node.kubernetes.io/unschedulable
        operator: Exists
      - effect: NoSchedule
        key: node.kubernetes.io/network-unavailable
        operator: Exists
      containers:
      - name: nvidia-device-plugin
        image: nvcr.io/nvidia/k8s-device-plugin:v0.14.1
        command: [ "/bin/sleep", "infinity" ]
      - name: composer-minimal
        image: 035363416972.dkr.ecr.us-east-1.amazonaws.com/minimal:latest
        command: [ "/bin/sleep", "infinity" ]
