2026-10-26 16:35:03 -04:00
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: DaemonSet
|
|
|
|
|
metadata:
|
|
|
|
|
name: etcd-io-guard
|
|
|
|
|
namespace: node-io
|
|
|
|
|
labels:
|
|
|
|
|
app: etcd-io-guard
|
|
|
|
|
spec:
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: etcd-io-guard
|
|
|
|
|
updateStrategy:
|
|
|
|
|
type: RollingUpdate
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: etcd-io-guard
|
|
|
|
|
spec:
|
|
|
|
|
# siriussec is the only node that hosts the etcd data dir and the dind
|
|
|
|
|
# runner data-root on the same NVMe.
|
|
|
|
|
nodeSelector:
|
|
|
|
|
kubernetes.io/hostname: siriussec
|
|
|
|
|
tolerations:
|
|
|
|
|
- operator: Exists
|
|
|
|
|
hostPID: true
|
|
|
|
|
priorityClassName: system-node-critical
|
|
|
|
|
containers:
|
|
|
|
|
- name: guard
|
|
|
|
|
image: busybox:1.36
|
|
|
|
|
imagePullPolicy: IfNotPresent
|
2026-10-26 16:41:40 -04:00
|
|
|
# ConfigMap keys are the source filenames, so the mounted path is
|
|
|
|
|
# /opt/guard/guard-script.sh (NOT guard.sh - that typo kept the
|
|
|
|
|
# guard in CrashLoopBackOff and the limits unapplied).
|
|
|
|
|
command: ["/bin/sh", "/opt/guard/guard-script.sh"]
|
2026-10-26 16:35:03 -04:00
|
|
|
env:
|
|
|
|
|
- name: DIRTY_BYTES
|
|
|
|
|
valueFrom:
|
|
|
|
|
configMapKeyRef:
|
|
|
|
|
name: etcd-io-guard-config
|
|
|
|
|
key: dirty-bytes
|
|
|
|
|
- name: DIRTY_BACKGROUND_BYTES
|
|
|
|
|
valueFrom:
|
|
|
|
|
configMapKeyRef:
|
|
|
|
|
name: etcd-io-guard-config
|
|
|
|
|
key: dirty-background-bytes
|
2026-10-26 17:10:18 -04:00
|
|
|
- name: DIND_WBPS
|
|
|
|
|
valueFrom:
|
|
|
|
|
configMapKeyRef:
|
|
|
|
|
name: etcd-io-guard-config
|
|
|
|
|
key: dind-wbps
|
2026-10-26 16:35:03 -04:00
|
|
|
securityContext:
|
|
|
|
|
privileged: true
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
cpu: 5m
|
|
|
|
|
memory: 8Mi
|
|
|
|
|
limits:
|
|
|
|
|
cpu: 50m
|
|
|
|
|
memory: 32Mi
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: host-proc-sys
|
|
|
|
|
mountPath: /host/proc/sys/vm
|
2026-10-26 17:10:18 -04:00
|
|
|
- name: host-proc
|
|
|
|
|
mountPath: /host/proc
|
|
|
|
|
readOnly: true
|
|
|
|
|
- name: host-cgroup
|
|
|
|
|
mountPath: /host/sys/fs/cgroup
|
2026-10-26 16:35:03 -04:00
|
|
|
- name: script
|
|
|
|
|
mountPath: /opt/guard
|
|
|
|
|
readOnly: true
|
|
|
|
|
volumes:
|
|
|
|
|
- name: host-proc-sys
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /proc/sys/vm
|
|
|
|
|
type: Directory
|
2026-10-26 17:10:18 -04:00
|
|
|
- name: host-proc
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /proc
|
|
|
|
|
type: Directory
|
|
|
|
|
- name: host-cgroup
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /sys/fs/cgroup
|
|
|
|
|
type: Directory
|
2026-10-26 16:35:03 -04:00
|
|
|
- name: script
|
|
|
|
|
configMap:
|
|
|
|
|
name: etcd-io-guard-script
|
|
|
|
|
defaultMode: 0755
|