k8s: the controller's listener is a ClusterIP service the host dials by name
The controller's api port was a hostPort on the node, which Pod Security baseline and restricted forbid. It is a ClusterIP Service now, behind a NetworkPolicy that admits only the node. The host's resolver (the hive's dnsmasq) forwards cluster.local to CoreDNS, and the gateway dials the Service by name through nginx's resolver. tcp.hostAddress goes.
This commit is contained in:
parent
2c1dc695c5
commit
9a72d07c05
1 changed files with 355 additions and 103 deletions
|
|
@ -19,14 +19,14 @@ to the cluster, when the service's `runtime` says `"k8s"`.
|
|||
|
||||
A service gets manifests on the host whose configuration deploys it:
|
||||
|
||||
| service | workload | other objects |
|
||||
| ------------------------- | ---------- | ------------------------------------------------------------------------------------------------ |
|
||||
| `swarm-controller` | Deployment | ServiceAccount, PersistentVolumeClaim `swarm-controller-state`, ConfigMap `swarm-controller-etc` |
|
||||
| `swarm-notify-router` | 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` |
|
||||
| service | workload | other objects |
|
||||
| ------------------------- | ---------- | ------------------------------------------------------------------------------------------ |
|
||||
| `swarm-controller` | Deployment | ServiceAccount, ConfigMap `swarm-controller-etc`; Service, NetworkPolicy with the listener |
|
||||
| `swarm-notify-router` | 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` |
|
||||
|
||||
`namespace.yaml` holds the Namespace. NATS with its auth responder has no
|
||||
manifests yet: its image doesn't exist yet.
|
||||
|
|
@ -133,11 +133,11 @@ credential directory.
|
|||
(see [Readiness checks](../swarm/readiness.md)). `swarm-controller` is one of
|
||||
them, with `SWARM_CONTROLLER_HEALTH_ADDR`.
|
||||
- **Listener and init container:** a service with a TCP `listener`
|
||||
(`swarm-controller`, with `swarm.controller.tcp.enable`) publishes its port on
|
||||
the node's address with a `hostPort`, and gets an init container and a
|
||||
renewal container that issue its leaf into an `emptyDir`
|
||||
([runtime](runtime.md#the-controller)). The image of those containers is part
|
||||
of `system.build.k8sImages`.
|
||||
(`swarm-controller`, with `swarm.controller.tcp.enable`) publishes its port
|
||||
with a ClusterIP Service, admits only the node to it with a NetworkPolicy, and
|
||||
gets an init container and a renewal container that issue its leaf into an
|
||||
`emptyDir` ([runtime](runtime.md#the-controller)). The image of those
|
||||
containers is part of `system.build.k8sImages`.
|
||||
- **More than the daemon:** a service whose pod holds more than its daemon
|
||||
(the queue, whose server and exporter run beside the responder) names a
|
||||
function in its entry that adds containers, init containers, volumes, host
|
||||
|
|
|
|||
Loading…
Reference in a new issue