apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fan-control
  labels:
    app.kubernetes.io/name: fan-control
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: fan-control
  template:
    metadata:
      labels:
        app.kubernetes.io/name: fan-control
    spec:
      tolerations:
      - key: node-role.kubernetes.io/master
        operator: Exists
        effect: NoSchedule
      containers:
      - image: ghcr.io/cpanato/fan-control:0.1.1
        args: ["server"]
        ports:
        - name: metrics
          containerPort: 9001
          protocol: TCP
        imagePullPolicy: IfNotPresent
        name: fan
        terminationMessagePath: /var/log/termination-log
        terminationMessagePolicy: File
        securityContext:
          runAsGroup: 0
          runAsUser: 0
          privileged: true
          capabilities:
            add: ["SYS_RAWIO"]
        resources:
          limits:
            cpu: 100m
            memory: 100Mi
          requests:
            cpu: 5m
            memory: 10Mi
