apps(netsec): hubble-flow-collector DaemonSet — filtered flow capture on siriussec

Phase 1a of the netsec program. A long-lived hubble observe consumer (the agent
ring buffer is ~28s at 148 flows/s, so polling is lossy), server-side filtered
to drop/policy-verdict/l7/trace:to-network, post-filtered so only drop, denial,
L7 and to-world peers (outside 10.244.0.0/16 + 10.10.0.0/24) reach disk.

Bounded at <=6 files x 150 MiB = 900 MiB under the 1 GiB cap, oldest deleted
first, enforced by the writer itself. The socket is mounted as a single file
(/var/run/cilium/hubble.sock); the directory would hand over cilium.sock, i.e.
cluster datapath admin. Image is the agent's own digest, no version skew.

No Service, no HTTPRoute, no Gateway port: node-local writer, root-owned
/var/log/netsec is the only host write.
This commit is contained in:
Lance Walters 2026-11-27 00:02:50 -05:00
commit b36e129c7e
6 changed files with 290 additions and 0 deletions

View file

@ -0,0 +1,16 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- daemonset.yaml
# The collector script and the post-filter ship as files (not inline YAML) so
# they stay readable and lintable; kustomize rewrites the DS volume to the
# hashed name, so a script change rolls the DaemonSet.
configMapGenerator:
- name: hubble-flow-collector-scripts
namespace: netsec
files:
- collect.sh
- filter.awk
generatorOptions:
disableNameSuffixHash: false