fix(netpol): allow woodpecker secret-rotator to reach OpenBao #299

Merged
k.renner merged 1 commits from fix/woodpecker-rotator-openbao-netpol into master 2026-07-18 19:17:12 +00:00
2 changed files with 23 additions and 0 deletions
@@ -45,6 +45,17 @@ spec:
- ports:
- port: "1883"
protocol: TCP
# woodpecker-secret-rotate CronJob writes WOODPECKER_AGENT_SECRET to the
# OpenBao KV API (:8200). Namespace-wide egress here is scoped in effect by
# openbao's own ingress policy (rotator pod only) — same pattern as the
# mosquitto rule above (see openbao-ns.yaml).
- toEndpoints:
- matchLabels:
"k8s:io.kubernetes.pod.namespace": openbao
toPorts:
- ports:
- port: "8200"
protocol: TCP
- toEntities:
- host
- remote-node
@@ -31,6 +31,18 @@ spec:
- ports:
- port: "8200"
protocol: TCP
# woodpecker-secret-rotate CronJob (apps ns) writes WOODPECKER_AGENT_SECRET
# via the KV API. Scoped to the rotator pod labels — this ingress rule is the
# actual security boundary for the namespace-wide apps->openbao egress allow.
- fromEndpoints:
- matchLabels:
"k8s:io.kubernetes.pod.namespace": apps
app.kubernetes.io/name: woodpecker
app.kubernetes.io/component: secret-rotator
toPorts:
- ports:
- port: "8200"
protocol: TCP
egress:
# Adding an egress stanza flips this namespace from egress-unrestricted to
# egress default-deny. The intent is to block lateral in-cluster egress —