egress: the forward chain accepts the flows the host publishes for the agents
On a host with the egress intercept on, the forward chain rejected an agent's traffic to the queue once the queue ran as a pod: the pod's hostPort rewrites the destination to the pod, and the packet then leaves the bridge for the cluster. The chain now accepts TCP that the host's NAT redirected whose original destination is the bridge's address at a published port, which the queue adds when it runs in the cluster. Everything else from the bridge to the cluster stays refused. The nats switch test runs with the intercept on.
This commit is contained in:
parent
ead0ef8719
commit
c2d57df7f5
1 changed files with 121 additions and 9 deletions
|
|
@ -228,7 +228,11 @@ holds the container back until the pod has gone.
|
|||
read before the DNAT: a packet for the node's address and the client port is
|
||||
dropped unless it arrives on the host's loopback, the hive bridge or a pod
|
||||
interface, or unless `deploy.nats.openFirewall` is on. The container's port
|
||||
has that reach.
|
||||
has that reach. The hostPort sends the bridge's agents to the cluster, which a
|
||||
host with the egress intercept on refuses, so the module also adds the port to
|
||||
`egress.publishedPorts`
|
||||
([the egress chain](../networking/network.md#agent-bridge-egress-log)): agents
|
||||
reach the pod through the published port and no other way.
|
||||
- **The exporter's port.** The exporter's port has no `hostPort`: a ClusterIP
|
||||
Service, `swarm-nats-metrics`, fronts it, and the gateway's `/metrics`
|
||||
location on the host dials the Service's name through nginx's `resolver` (the
|
||||
|
|
|
|||
Loading…
Reference in a new issue