Skip to main content
Version: v3.9.0

Distribution tags

An Edgelet node opens a local listener on bridgePort only when its tags select the Service. Hub ready does not mean every node is listening. Kubernetes annotation tags are a second use of the same list.

How the connector and listener are shaped is on TCP bridge. Controller placement and the objects written on each router are on Service interconnection.

Prefix​

The Service stores the bare token in metadata.tags (for example checkout). The node stores the prefixed tag service.iofog.org/tag: checkout.

Tag on the Edgelet nodeMatches
service.iofog.org/tag: checkoutServices whose metadata.tags include checkout
service.iofog.org/tag: allEvery Service
checkoutNothing. A bare tag on the node matches nothing.
service.iofog.org/tag:checkoutNothing. The stored value has a space after the colon.

The tag all matches every Service. Put it on the node as service.iofog.org/tag: all. The Service does not need its own all tag.

Set the prefixed tag on kind: Agent or kind: AgentConfig. See Edgelet nodes.

Service tags​

Tag on the ServiceDistributionKubernetes annotation
checkoutYes. Matches nodes tagged service.iofog.org/tag: checkout.checkout with an empty value
service.beta.kubernetes.io/aws-load-balancer-type: nlbNo. A tag that contains : is skipped.The key and the value
A tag that contains =NoController annotation rules

On create or update, the Controller includes every node tagged service.iofog.org/tag: all. For each Service tag without : or =, it includes nodes tagged service.iofog.org/tag: {token}. It then reconciles those nodes.

On a Kubernetes control plane, the same metadata.tags list is copied onto the Kubernetes Service. Each tag is split on the first :. A tag with no colon becomes an annotation with an empty value. Text after a second colon is dropped. An update replaces the annotation map the Controller wrote. Those annotations are not distribution tags.

A node with routerMode: none does not get listeners.

Which nodes listen​

NodeTagsListeners after reconcile
plant-aservice.iofog.org/tag: checkoutThe checkout listener only
plant-bservice.iofog.org/tag: allA listener for every Service
plant-ccheckout onlyNone

The connector for a microservice is written on the Edgelet node that runs the microservice, whether or not that node's tags select the Service. The listener on that same node appears only when the tags select it.

A microservice on the bridge network of a node that received the listener dials the router on that node. Edgelet DNS reserves router.default.svc.bridge.local for the router microservice. See Bridge DNS and DNS.

checkout-listener binds bridge port 10024. A microservice on plant-a or plant-b reaches that listener at router.default.svc.bridge.local:10024. Use the bridgePort assigned to the Service.

edgelet.default.svc.bridge.local is the Edgelet node. The connector uses that name when the backend is on the host network. Clients of the distributed Service use the router name and bridgePort.

A tag edit reconciles nodes from the old tags and the new tags. A node that lost the tag drops the listener.

Reconcile from the node​

Create and update start from the Service and find Edgelet nodes. A later reconcile starts from the node.

  1. Keep tags that start with service.iofog.org/tag.
  2. Take the text after the first colon and trim it.
  3. If one value is all, select every Service.
  4. Otherwise select each Service whose tag equals that token.

That pass rebuilds tcpListeners on the node. Entries whose name ends with -listener are removed and replaced by the current match. tcpConnectors on the same node stay.

FieldValue
Name{name}-listener, for example checkout-listener
PortThe assigned bridgePort
AddressThe Service name

The router joins a listener and a connector that share address. A microservice on the bridge network dials router.default.svc.bridge.local and that bridgePort. Traffic for that address goes to the connector on the backend node.

Group 3See anything wrong with the document? Help us improve it!