|
1 | 1 | # The shared namespace decides which keys are refused, inert, or pod-level |
2 | 2 |
|
3 | 3 | Every service runs in one pod sharing `net`, `uts`, `ipc` and `cgroup`, and the shared network |
4 | | -namespace, with localhost discovery through per-container `--add-host`, is the reason the tool |
5 | | -exists. Keys that pull a container out of it (`network_mode`, `links`, `external_links`, |
6 | | -`expose`) are refused permanently; per-container namespace overrides (`ipc`, `uts`, `domainname`, |
7 | | -`cgroup`, `userns_mode`) are refused while the pod keeps its default `--share`. `dns*` and |
8 | | -`sysctls` are pod-level, unioned and conflict-checked across the closure onto |
9 | | -`podman pod create`, because a container that joined the pod owns neither namespace and podman |
10 | | -rejects the per-container flag. `stop_signal` and `stop_grace_period` are accepted but inert, in |
11 | | -`IGNORED_SERVICE_KEYS` with a warning: the script tears down with `pod rm -f` and never runs |
12 | | -`podman stop`, so the flags would set metadata nothing consults. |
| 4 | +namespace, with localhost discovery through a bind-mounted hosts file, is the reason the tool |
| 5 | +exists. Keys that pull a container out of it (`network_mode`, `external_links`) are refused |
| 6 | +permanently: `network_mode` moves the container to another namespace, and `external_links` names |
| 7 | +a container the generated script never creates, which the pod's hosts file -- where every name |
| 8 | +compose2pod writes resolves to `127.0.0.1` -- has no address for, `extra_hosts` being the |
| 9 | +supported way to name one. This clause once also swept up `links` and `expose`, which arrived in |
| 10 | +the same sentence and belong in neither category |
| 11 | +([#120](https://github.com/modern-python/compose2pod/issues/120), measured against |
| 12 | +`docker compose config` v5.1.2). `links` normalises to a `depends_on` edge plus a hostname alias |
| 13 | +-- docker refuses `links: [ghost]` exactly as it refuses a ghost `depends_on` -- so it neither |
| 14 | +escapes the namespace nor is satisfied by it, and ignoring it would drop a dependency the |
| 15 | +`--target` closure is built from. It is refused as a tracked limitation under |
| 16 | +[ADR-0006](0006-docker-rejection-parity.md), and both halves are mechanisms compose2pod already |
| 17 | +has, so this one is expected to shrink. `expose` carries no edge, is never published, and is |
| 18 | +validated by docker no further than its list shape (it keeps `expose: [banana]`), which makes it |
| 19 | +inert exactly as `ports` is: it sits in `IGNORED_SERVICE_KEYS` with a warning, not refused. |
| 20 | +Per-container namespace overrides (`ipc`, `uts`, `domainname`, `cgroup`, `userns_mode`) are |
| 21 | +refused while the pod keeps its default `--share`. `dns*` and `sysctls` are pod-level, unioned |
| 22 | +and conflict-checked across the closure onto `podman pod create`, because a container that joined |
| 23 | +the pod owns neither namespace and podman rejects the per-container flag. `stop_signal` and |
| 24 | +`stop_grace_period` are accepted but inert for a different reason, in that same table with a |
| 25 | +warning: the script tears down with `pod rm -f` and never runs `podman stop`, so the flags would |
| 26 | +set metadata nothing consults. Inert is not unchecked -- every key in the table keeps docker's own |
| 27 | +shape rule at the gate, since a document carrying a malformed one is a document docker will not |
| 28 | +run. |
0 commit comments