Skip to content

Instantly share code, notes, and snippets.

@thiagobrabo
Last active September 15, 2023 14:34
Show Gist options
  • Select an option

  • Save thiagobrabo/ece449b3d701934c7c76bc2b7e9ffd20 to your computer and use it in GitHub Desktop.

Select an option

Save thiagobrabo/ece449b3d701934c7c76bc2b7e9ffd20 to your computer and use it in GitHub Desktop.

Revisions

  1. Brabo revised this gist Sep 15, 2023. No changes.
  2. Brabo revised this gist Sep 15, 2023. No changes.
  3. Brabo revised this gist Sep 15, 2023. No changes.
  4. Brabo revised this gist Sep 15, 2023. No changes.
  5. Brabo created this gist Sep 15, 2023.
    36 changes: 36 additions & 0 deletions disk-checker.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    apiVersion: apps/v1
    kind: DaemonSet
    metadata:
    name: disk-checker
    labels:
    app: disk-checker
    spec:
    selector:
    matchLabels:
    app: disk-checker
    template:
    metadata:
    labels:
    app: disk-checker
    spec:
    hostPID: true
    hostIPC: true
    hostNetwork: true
    containers:
    - resources:
    requests:
    cpu: 0.15
    securityContext:
    privileged: true
    image: busybox
    imagePullPolicy: IfNotPresent
    name: disk-checked
    command: ["/bin/sh"]
    args: ["-c", "du -a /host | sort -n -r | head -n 20"]
    volumeMounts:
    - name: host
    mountPath: "/host"
    volumes:
    - name: host
    hostPath:
    path: "/"