@@ -9,19 +9,6 @@ Each mesh can federate a subset of its services to allow applications from other
9
9
Federated services are exposed on a passthrough gateway, so mTLS is not terminated at the edge of the cluster,
10
10
and authorization can be performed by the federated application.
11
11
12
- ## How it works
13
-
14
- Controllers are deployed with sidecars like any other application in the mesh. Controllers connect to remote peers
15
- and send a discovery request to subscribe to federated services.
16
- When a controller receives discovery response with a federated service, it creates ` ServiceEntriy ` or ` WorkloadEntry `
17
- in the local cluster depending on whether the service exists locally.
18
- The controller also watches local ` Service ` objects and checks if they match the export rules - if so,
19
- it adds the service's FQDN to the auto-passthrough ` Gateway ` hosts.
20
-
21
- ## High-level architecture
22
-
23
- ![ architecture] ( docs/img/architecture.jpg )
24
-
25
12
## Multi-primary vs federation
26
13
27
14
[ Multi-primary] ( https://istio.io/latest/docs/setup/install/multicluster/multi-primary_multi-network/ ) and
@@ -58,27 +45,59 @@ However, these solutions do not fit well in the following cases:
58
45
59
46
** Reason** : Since federated meshes don’t rely on a shared control plane, issues are localized to individual clusters.
60
47
48
+ ## High-level architecture
49
+
50
+ ![ architecture] ( docs/img/architecture.jpg )
51
+
52
+ ## How it works
53
+
54
+ ### Service discovery
55
+
56
+ #### Import
57
+
58
+ Controllers connect to each other using gRPC protocol and subscribe to ` FederatedService ` API.
59
+ When a controller receives an update, it creates ` ServiceEntry ` or ` WorkloadEntry ` depending on the local cluster state.
60
+ It also applies client-side configurations using ` DestinationRule ` if the mesh federation requires customizing SNI for cross-cluster traffic.
61
+
62
+ #### Export
63
+
64
+ Controllers connect to the local kube-apiserver to discover local services matching export rules.
65
+ When a controller receives an update from Kubernetes about a ` Service ` matching export rules,
66
+ it is exposed on a federation ingress gateway. The federation ingress gateway is very similar to the east-west gateway
67
+ in multi-primary and primary-remote deployments, but it exposes only one TLS auto-passthrough port.
68
+
69
+ ### Security
70
+
71
+ The federation controller is deployed within each federated mesh with a sidecar like any other application.
72
+ Each controller creates ` PeerAuthentication ` to enable strict mTLS for itself and configures proper ` AuthorizationPolicy `
73
+ to allow traffic only from the configured remote controllers.
74
+
75
+ Controllers DO NOT enforce any authz policy at the mesh boundaries to avoid mTLS termination between applications.
76
+ Application or cluster admins are responsible for configuring their authz policies, and it is highly recommended
77
+ to deny all traffic by default and allow only selected services.
78
+
61
79
## Identity and trust model
62
80
63
81
This controller does not provide any mechanism to share trust bundles between meshes using different CAs.
64
- It can only enable mTLS communication between meshes if all use the same CA or use SPIRE with enabled trust bundle federation.
82
+ It can only enable mTLS communication between meshes when all clusters use the same root CA or use SPIRE
83
+ with enabled trust bundle federation.
65
84
66
85
## Getting started
67
86
68
87
Follow these guides to see how it works in practice:
69
- 1 . [ Simple multi-cluster bookinfo deployment] ( examples/README.md ) .
88
+ 1 . [ Simple multi-mesh bookinfo deployment] ( examples/README.md ) .
70
89
2 . [ Integration with SPIRE] ( examples/spire/README.md ) .
71
90
72
91
## Comparing to other projects
73
92
74
93
#### Admiral
75
94
76
- Admiral is primarily designed to manage multi-cluster service discovery and traffic distribution in Istio,
77
- focusing on use cases where clusters are part of a single logical mesh, such as multi-primary or primary-remote topologies.
78
- Admiral does not natively support mesh federation in the way Istio defines it, so it's a very different project
79
- and federation controller is not an alternative for it.
95
+ [ Admiral] ( https://github.com/istio-ecosystem/admiral ) is primarily designed to manage multi-cluster service discovery
96
+ and traffic distribution in Istio, focusing on use cases where clusters are part of a single logical mesh,
97
+ such as multi-primary or primary-remote topologies, so it does not seem like a right place to implement multi-mesh APIs.
80
98
81
- #### SPIRE
99
+ #### Emcee
82
100
83
- SPIRE federation enables secure communication and authentication for workloads in different trust domains integrated with different CAs.
84
- These projects ideally complement each other, as SPIRE federates identities, and federation controller federates Istio services and endpoints.
101
+ [ Emcee] ( https://github.com/istio-ecosystem/emcee ) was a PoC of multi-mesh deployment, but that project has been inactive for 5 years,
102
+ and there is no clear value in contributing our ideas, because that would require to change all APIs and general assumptions for that project,
103
+ so it's easier to start from scratch.
0 commit comments