apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: &name nsenter
  labels:
    app: *name
spec:
  selector:
    matchLabels:
      app: *name
  template:
    metadata:
      labels:
        app: *name
    spec:
      # affinity:
      #   nodeAffinity:
      #     requiredDuringSchedulingIgnoredDuringExecution:
      #       nodeSelectorTerms:
      #       - matchExpressions:
      #         - key: node.kubernetes.io/instance-type
      #           operator: In
      #           values:
      #           - Standard_NV6ads_A10_v5
      hostNetwork: true
      hostPID: true
      containers:
      - image: mcr.microsoft.com/aks/aks-gpu:${TAG}
        imagePullPolicy: Always
        name: *name
        command: ["/entrypoint.sh"]
        args: ["install", "sleep"]
        resources:
          requests:
            {}
          limits:
            {}
        securityContext:
          privileged: true
        volumeMounts:
        - name: hostmount
          mountPath: "/mnt/actions"
        - name: gpu
          mountPath: "/mnt/gpu"
      volumes:
      - name: gpu
        hostPath:
          path: /opt/gpu
          type: DirectoryOrCreate
      - name: hostmount
        hostPath:
          path: /opt/actions
          type: DirectoryOrCreate
---