titan-iac/services/logging/node-log-rotation-daemonset.yaml

62 lines
1.7 KiB
YAML
Raw Normal View History

2026-01-10 05:06:34 -03:00
# services/logging/node-log-rotation-daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-log-rotation
namespace: logging
spec:
selector:
matchLabels:
app: node-log-rotation
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
2026-04-27 16:49:11 -03:00
logging.bstein.dev/node-log-rotation-rev: "2026-04-27-3"
2026-01-10 05:06:34 -03:00
labels:
app: node-log-rotation
spec:
serviceAccountName: node-log-rotation
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
nodeSelector:
node-role.kubernetes.io/worker: "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: hardware
operator: In
values:
- rpi4
- rpi5
2026-01-10 05:06:34 -03:00
containers:
- name: node-log-rotation
image: bitnami/kubectl@sha256:554ab88b1858e8424c55de37ad417b16f2a0e65d1607aa0f3fe3ce9b9f10b131
command: ["/usr/bin/env", "bash"]
args: ["/scripts/node_log_rotation.sh"]
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- name: host-root
mountPath: /host
- name: script
mountPath: /scripts
readOnly: true
volumes:
- name: host-root
hostPath:
path: /
- name: script
configMap:
name: node-log-rotation-script
defaultMode: 0555