You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flowchart TD
subgraph config-cluster["configcluster <br> "];
HTTPRoute --> service-X-import
HTTPRoute -..-> service-X-import
end
subgraph cluster2["cluster2 <br> "];
service-X-import --> service-X-export --> service-X --> pods-X
end
subgraph cluster1["cluster1 <br> "];
service-X-import --> .service-X-export -->.service-X --> .pods-X
end
Loading
Precondition
As presented on visual, we have 2 separate clusters: cluster1 and cluster2. It's not uncommon to have the same service with the same name to be deployed into multiple clusters to achieve HA/DR capabilities. Note that service name is the same in both cluster - specifically "service-X".
Use case
We want to have an HTTPRoute in a "config" cluster to route requests evenly to service-X in both clusters. To achieve that, we create ServiceExports in cluster1 and cluster2. Note that current implementation would look at ServiceExport-s names to map them to respective Services in the cluster. Then we want to create ServiceImports in a "config" cluster. Note that current implementation would look at ServiceImport names to map them to respective ServiceExports from cluster1 and cluster2. Then we want to create an HTTPRoute with 2 backendRefs - one for ServiceImport of service-X from cluster1 and one for ServiceImport of service-X from cluster2. It would look similar to
Because resource names are used to map to actual services, we have a conflict in the routing manifest with two identical service imports representing the same service-X deployed to multiple clusters 1 and 2.
Potential solution
Use annotations on resources to map to Services and fallback to resource names (for backward compatibility). The manifests would look like:
Potentially this might be the only place where changes need to be done. If we decouple Service and ServiceExport, the rest becomes unblocked autometicaly.
Precondition
As presented on visual, we have 2 separate clusters: cluster1 and cluster2. It's not uncommon to have the same service with the same name to be deployed into multiple clusters to achieve HA/DR capabilities. Note that service name is the same in both cluster - specifically "service-X".
Use case
We want to have an HTTPRoute in a "config" cluster to route requests evenly to service-X in both clusters. To achieve that, we create ServiceExports in cluster1 and cluster2. Note that current implementation would look at ServiceExport-s names to map them to respective Services in the cluster. Then we want to create ServiceImports in a "config" cluster. Note that current implementation would look at ServiceImport names to map them to respective ServiceExports from cluster1 and cluster2. Then we want to create an HTTPRoute with 2 backendRefs - one for ServiceImport of service-X from cluster1 and one for ServiceImport of service-X from cluster2. It would look similar to
Problem
Because resource names are used to map to actual services, we have a conflict in the routing manifest with two identical service imports representing the same service-X deployed to multiple clusters 1 and 2.
Potential solution
Use annotations on resources to map to Services and fallback to resource names (for backward compatibility). The manifests would look like:
The text was updated successfully, but these errors were encountered: