openservicemesh / osm

Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.
https://openservicemesh.io/
Apache License 2.0
2.59k stars 277 forks source link

Create a workflow to generate 2 clusters provisioned with ServiceImports/Exports #4974

Closed steeling closed 1 year ago

steeling commented 1 year ago

@allenlsy has been experimenting with Submariner. Submariner is a unique MCS implementation that creates ServiceImports/Exports and populates with the IP address of the Submariner gateway, which handles network connectivity across clusters.

As a service mesh, we will need to create our own network connectivity solution, agnostic to submariner. This bug is explicitly to create a workflow to "join" to clusters, such that they are aware of a set of ServiceImports and ServiceExports for appropriate services in each cluster.

This may be as simple as a script that wraps kubectl commands to:

  1. Create ServiceImport and ServiceExport CRD's
  2. Create a loadbalancer in each cluster
  3. create ServiceExports in each cluster
  4. Create the appropriate ServiceImports in the remote clusters, corresponding to the ServiceImport.
  5. The ServiceImport clusterIP should also work with CoreDNS, so we will likely need to add a CoreDNS entry
allenlsy commented 1 year ago

FYI, we had invested in setting up a multicluster environment before using Kind or AKS:

https://github.com/openservicemesh/osm/pull/3984 https://github.com/openservicemesh/osm/pull/3915

Want to hear your opinion if we can still leverage these changes and start this issue.

steeling commented 1 year ago

I imagine a tool could be agnostic to the clusters themselves. Passing in 2 kubectl context names should allow it to work anywhere

allenlsy commented 1 year ago

We can have a subtasks list here:

Note that it is mentioned in KEP-1645 that MCS API implementation is responsible for the tooling

https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/1645-multi-cluster-services-api#exporting-services

More subtasks can be added if necessary.