diff --git a/services/logging/node-log-rotation-daemonset.yaml b/services/logging/node-log-rotation-daemonset.yaml index 759c9c91..99216abf 100644 --- a/services/logging/node-log-rotation-daemonset.yaml +++ b/services/logging/node-log-rotation-daemonset.yaml @@ -13,7 +13,7 @@ spec: template: metadata: annotations: - logging.bstein.dev/node-log-rotation-rev: "2026-04-27-2" + logging.bstein.dev/node-log-rotation-rev: "2026-04-27-3" labels: app: node-log-rotation spec: diff --git a/services/logging/scripts/node_log_rotation.sh b/services/logging/scripts/node_log_rotation.sh index 97098832..774536ce 100644 --- a/services/logging/scripts/node_log_rotation.sh +++ b/services/logging/scripts/node_log_rotation.sh @@ -109,7 +109,7 @@ trim_constrained_pod_logs() { if [ -z "${usage}" ] || [ "${usage}" -lt 75 ]; then continue fi - find "${base}/pods" -type f -name '[1-9]*.log' -size +1M -print -exec truncate -s 0 {} \; 2>/dev/null || true + find "${base}/pods" -type f \( -name '[1-9]*.log' -o -name '*.log.20*' \) -size +1M -print -exec truncate -s 0 {} \; 2>/dev/null || true if [ -d "${base}/containers" ]; then find "${base}/containers" -xtype l -print -delete 2>/dev/null || true fi