apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: node-exporter-textfiles
  labels:
    app.kubernetes.io/name: node-exporter-textfiles
spec:
  updateStrategy:
    rollingUpdate:
      maxUnavailable: 5
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/name: node-exporter-textfiles
  template:
    metadata:
      name: node-exporter-textfiles
      labels:
        app.kubernetes.io/name: node-exporter-textfiles
    spec:
      tolerations:
        - key: node-role.kubernetes.io/master
          operator: Exists
          effect: "NoSchedule"
        - key: "CriticalAddonsOnly"
          operator: "Exists"
      terminationGracePeriodSeconds: 5
      containers:
      - image: quay.io/galexrt/node-exporter-textfiles:v20220203-125335-155
        name: smartmon
        env:
        - name: INTERVAL
          value: "900"
        - name: SCRIPT
          value: "smartmon.sh"
        securityContext:
          privileged: true
        resources:
          requests:
            cpu: 25m
            memory: 50Mi
          limits:
            cpu: 250m
            memory: 75Mi
        volumeMounts:
        - mountPath: /dev
          name: host-dev
          readOnly: true
        - mountPath: /var/lib/node_exporter
          name: host-textfile
          readOnly: false
      - image: quay.io/galexrt/node-exporter-textfiles:v20220203-125335-155
        name: nvmemetrics
        env:
        - name: INTERVAL
          value: "900"
        - name: SCRIPT
          value: "nvme_metrics.sh"
        securityContext:
          privileged: true
        resources:
          requests:
            cpu: 25m
            memory: 50Mi
          limits:
            cpu: 250m
            memory: 75Mi
        volumeMounts:
        - mountPath: /dev
          name: host-dev
          readOnly: true
        - mountPath: /var/lib/node_exporter
          name: host-textfile
          readOnly: false
      volumes:
      - hostPath:
          path: /dev
        name: host-dev
      - hostPath:
          path: /var/lib/node_exporter
        name: host-textfile
