The static-routing-manager module manages static routes and ip rule entries on cluster nodes.
The module works with the following custom resources of the network.deckhouse.io API group:
- IPRuleSet: Describes a set of
ip ruleentries to be created on nodes matching anodeSelector. - RoutingTable: Describes a routing table and the routes it contains, for nodes matching a
nodeSelector.
The module also works with the following internal custom resources of the internal.network.deckhouse.io API group:
- SDNInternalNodeIPRuleSet: Contains the set of
ip ruleentries for a specific cluster node. - SDNInternalNodeRoutingTable: Contains the routing table for a specific cluster node.
For more details about module configuration and usage examples, refer to the corresponding documentation section.
Module architecture
The following simplifications are made in the diagram:
- The diagram shows containers in different pods interacting directly with each other. In reality, they communicate via the corresponding Kubernetes Services (internal load balancers). Service names are omitted if they are obvious from the diagram context. Otherwise, the Service name is shown above the arrow.
- Pods may run multiple replicas. However, each pod is shown as a single replica in the diagram.
The Level 2 C4 architecture of the static-routing-manager module and its interactions with other components of Deckhouse Platform are shown in the following diagram:
Module components
The module consists of one agent (DaemonSet) component and one agent container. Agent runs on every cluster node and performs the following actions:
- Watches SDNInternalNodeRoutingTable and SDNInternalNodeIPRuleSet custom resources and updates their status.
- Applies the static routes and
ip ruleentries to the node’s kernel routing table.
The SDNInternalNodeRoutingTable and SDNInternalNodeIPRuleSet custom resources are created by the Deckhouse controller of the deckhouse module for each cluster node matching the nodeSelector of the IPRuleSet and RoutingTable resources.
Module interactions
The module interacts with kube-apiserver:
- Manages the SDNInternalNodeRoutingTable and SDNInternalNodeIPRuleSet custom resources.
- Watches the IPRuleSet and RoutingTable custom resources and updates their status.