# services/maintenance/titan-24-docker-daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: titan-24-docker
  namespace: maintenance
  labels:
    app: titan-24-docker
spec:
  selector:
    matchLabels:
      app: titan-24-docker
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: titan-24-docker
    spec:
      hostPID: true
      serviceAccountName: titan-24-docker
      nodeSelector:
        kubernetes.io/hostname: titan-24
      tolerations:
        - operator: Exists
        - key: node-role.kubernetes.io/accelerator
          operator: Exists
          effect: NoSchedule
      containers:
        - name: installer
          image: debian:13-slim
          imagePullPolicy: IfNotPresent
          command: ["/usr/bin/env", "bash"]
          args: ["/scripts/titan_24_docker.sh"]
          securityContext:
            privileged: true
            runAsUser: 0
          resources:
            requests:
              cpu: 25m
              memory: 64Mi
            limits:
              cpu: 500m
              memory: 512Mi
          volumeMounts:
            - name: host-root
              mountPath: /host
            - name: script
              mountPath: /scripts
              readOnly: true
      volumes:
        - name: host-root
          hostPath:
            path: /
        - name: script
          configMap:
            name: titan-24-docker-script
            defaultMode: 0555
