Watch
0
0
Fork
You've already forked hyperhive
0

k8s: stt's pod runs in a user namespace of its own

This commit is contained in:
atlas 2026-11-23 13:44:57 +01:00 • committed by mara
commit ada980f35c

View file

@ -276,19 +276,20 @@ The pod takes the unit's `MemoryMax` and `CPUQuota` as its container's limits
ceilings. The pod requests nothing (memory `0`, cpu `0`, as the unit sets no
`MemoryMin` or `MemoryLow`), so the node reserves nothing for it and the pod is
Burstable. `TasksMax` has no pod counterpart, so the renderer drops it. The
systemd sandbox (`MemoryDenyWriteExecute`, `SystemCallFilter`, `PrivateUsers`,
the read-only `ProtectSystem` and the rest) stays on the host. The pod is a
non-root user with a read-only root filesystem, every capability dropped, the
runtime's default seccomp profile and no API token. The host unit doesn't
restrict the network. The pod has a NetworkPolicy (`swarm-stt`, rendered with
the pod): it may reach cluster DNS, and on the node's bridge address the store's
pod listener, the identity provider, the queue and the hive collector, each on
its one port. It admits no ingress. The kubelet's probes still reach the pod,
because the node's own traffic to a pod is always admitted, and the pod doesn't
serve anything else: requests reach it as queue messages, over the connection it
opens. Where the queue runs in the cluster, the policy also allows the queue's
pod on its port, because the node forwards the queue's `hostPort` to the pod
before the policy sees the packet.
systemd sandbox (`MemoryDenyWriteExecute`, `SystemCallFilter`, the read-only
`ProtectSystem` and the rest) stays on the host, and `PrivateUsers` is the pod's
own user namespace (`hostUsers: false`). The pod is a non-root user with a
read-only root filesystem, every capability dropped, the runtime's default
seccomp profile and no API token. The host unit doesn't restrict the network.
The pod has a NetworkPolicy (`swarm-stt`, rendered with the pod): it may reach
cluster DNS, and on the node's bridge address the store's pod listener, the
identity provider, the queue and the hive collector, each on its one port. It
admits no ingress. The kubelet's probes still reach the pod, because the node's
own traffic to a pod is always admitted, and the pod doesn't serve anything
else: requests reach it as queue messages, over the connection it opens. Where
the queue runs in the cluster, the policy also allows the queue's pod on its
port, because the node forwards the queue's `hostPort` to the pod before the
policy sees the packet.
## Telemetry and credentials of the poller