homek8s/infrastructure/logging
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lance Walters fef71a280a infra(logging): ship kube-apiserver audit log with secret bodies stripped
t_104f62a6 made the apiserver audit log live on siriussec:
/var/log/kubernetes/audit/audit.log, mode 600 root, ~2.2 GB/day, rotated by the
apiserver itself (100 MB x 48, compressed). A pod-log collector never sees a
host file, so Alloy gets a read-only hostPath mount for that directory.

The file MUST NOT be shipped verbatim: at level=RequestResponse every
'get secrets' record carries responseObject.data — the plaintext secret.
The shipper therefore parses each record and re-emits a packed allowlist
(level, stage, verb, user, objectRef.*, responseStatus.code, sourceIPs[0],
userAgent, auditID, requestURI, requestReceivedTimestamp). requestObject and
responseObject never reach Loki; unparseable lines are dropped by stage.json
rather than passed through.

Nothing in that directory is written or pruned by the collector: the
apiserver's own 4.8 GB / 7-day rotation stays the only thing pruning it.
2026-11-27 00:49:07 -05:00
..
alloy infra(logging): ship kube-apiserver audit log with secret bodies stripped 2026-11-27 00:49:07 -05:00
loki infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4) 2026-11-27 00:36:56 -05:00
alloy.yaml infra(logging): ship kube-apiserver audit log with secret bodies stripped 2026-11-27 00:49:07 -05:00
datasource.yaml infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4) 2026-11-27 00:36:56 -05:00
kustomization.yaml infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4) 2026-11-27 00:36:56 -05:00
loki.yaml infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4) 2026-11-27 00:36:56 -05:00
monitoring.yaml infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4) 2026-11-27 00:36:56 -05:00
namespace.yaml infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4) 2026-11-27 00:36:56 -05:00