require k8s: swarm services with a pod run in the cluster only
This commit is contained in:
parent
7819ed2dbd
commit
2e1f037f25
1 changed files with 1044 additions and 3125 deletions
|
|
@ -514,24 +514,26 @@ The URL hooks register against is `deploy.swarm-controller.publicUrl`, default
|
|||
whether the gateway reaches the controller by socket or by its TCP listener. Set it when another
|
||||
URL fronts the controller.
|
||||
|
||||
## Reaching the controller over TCP (optional)
|
||||
## Reaching the controller over TCP
|
||||
|
||||
By default the gateway reaches the controller through a unix socket on the same host. Setting
|
||||
`swarm.controller.tcp.enable` and `swarm.controller.tcp.domain` on **every host of the swarm**
|
||||
adds a TLS listener beside the socket and points the gateway's `/api/` and `/webhook/forge/`
|
||||
locations at it by that name. Nothing else changes: the socket stays, and the operator gate on
|
||||
`/api/` stays.
|
||||
The controller runs as a pod in the host's cluster, so the gateway reaches it over a TLS
|
||||
listener, never a unix socket. `swarm.controller.tcp.enable` defaults on and
|
||||
`swarm.controller.tcp.domain` defaults to `controller.<swarm.domain>`, so nothing needs
|
||||
setting, on every host of the swarm alike. The controller's host refuses to evaluate
|
||||
with the listener off or with no swarm domain, naming the option. The gateway's `/api/` and `/webhook/forge/`
|
||||
locations dial the pod's Service and verify the certificate as that name. The operator gate on `/api/` stays.
|
||||
|
||||
What you provide:
|
||||
|
||||
- `swarm.controller.tcp.domain`, resolvable from the gateway's host. Nginx resolves it when it
|
||||
loads its config.
|
||||
- Nothing for the name: `swarm.controller.tcp.domain` is only the name the listener's
|
||||
certificate carries and the gateway verifies, because the gateway dials the pod's
|
||||
Service.
|
||||
- `deploy.swarm-controller.tcp.openFirewall = true` on the controller's host only when a gateway
|
||||
on another host dials it. The port (`swarm.controller.tcp.port`, default 9443) stays closed
|
||||
until you do, and `deploy.swarm-controller.tcp.listenAddress` picks the bound address.
|
||||
|
||||
With `deploy.swarm-controller.runtime = "k8s"` a ClusterIP Service publishes the
|
||||
pod's listener. The gateway dials the Service's name,
|
||||
The controller runs as a pod, and a ClusterIP Service publishes its
|
||||
listener. The gateway dials the Service's name,
|
||||
`swarm-controller.hyperhive.svc.cluster.local` by default, at the same port. The
|
||||
hive's resolver answers it through the cluster's DNS, so `gateway.dns.enable`
|
||||
has to be on. The gateway still verifies the certificate as
|
||||
|
|
|
|||
Loading…
Reference in a new issue