node-io: bound the writeback backlog so dind writeback cannot stall etcd

This commit is contained in:
Lance Walters 2026-10-26 16:35:03 -04:00
commit c773a3e2a9
7 changed files with 220 additions and 0 deletions

View file

@ -0,0 +1,66 @@
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
command: ["/bin/sh", "/opt/guard/guard.sh"]
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
securityContext:
privileged: true
resources:
requests:
cpu: 5m
memory: 8Mi
limits:
cpu: 50m
memory: 32Mi
volumeMounts:
- name: host-proc-sys
mountPath: /host/proc/sys/vm
- name: script
mountPath: /opt/guard
readOnly: true
volumes:
- name: host-proc-sys
hostPath:
path: /proc/sys/vm
type: Directory
- name: script
configMap:
name: etcd-io-guard-script
defaultMode: 0755