Watch
0
0
Fork
You've already forked hyperhive
0

k8s: stt's pod gets a network policy: dns and four host ports out, nothing in

This commit is contained in:
atlas 2026-11-23 13:36:51 +01:00 • committed by mara
commit 6051a83044

View file

@ -23,7 +23,7 @@ A service gets manifests on the host whose configuration deploys it:
| ------------------------- | ---------- | ------------------------------------------------------------------------------------------------ |
| `swarm-controller` | Deployment | ServiceAccount, PersistentVolumeClaim `swarm-controller-state`, ConfigMap `swarm-controller-etc` |
| `swarm-notify-router` | Deployment | ServiceAccount |
| `swarm-stt` | Deployment | ServiceAccount |
| `swarm-stt` | Deployment | ServiceAccount, NetworkPolicy `swarm-stt` |
| `swarm-review-classifier` | Deployment | ServiceAccount |
| `swarm-claude-login` | Deployment | ServiceAccount |
| `swarm-ci-metrics` | CronJob | ServiceAccount, PersistentVolumeClaim `swarm-ci-metrics-state` |
@ -113,6 +113,16 @@ credential directory.
renderer drops it. The unit's sandbox settings
(`MemoryDenyWriteExecute`, `SystemCallFilter`, `PrivateUsers` and the rest)
stay on the host: the pod has the security shape above and no other.
- **Network:** a service whose entry has `egress` (`swarm-stt`) gets a
NetworkPolicy named after it, selecting its pods for ingress and egress. It
allows no ingress; its egress is cluster DNS (the CoreDNS pod, port 53) and,
on the hive bridge's address, one TCP port per host service the entry names:
the store's pod listener (`store`), the gateway's 443 for the identity
provider (`identity`), the queue's port (`queue`) and the hive collector's
(`collector`). Where the queue runs in the cluster, its pod on its port is
allowed too. The node trusts the pod network's interfaces, so without the
policy a pod reaches every port of the host. A service without `egress` has no
policy.
- **Probes:** a service with an opt-in health listener gets its variable set to
`0.0.0.0:8080`, with liveness on `/healthz` and readiness on `/readyz`
(see [Readiness checks](../swarm/readiness.md)). `swarm-controller` is one of