osm icon indicating copy to clipboard operation
osm copied to clipboard

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

Open steeling opened this issue 1 year ago • 3 comments

@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

steeling avatar Aug 08 '22 23:08 steeling

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.

allenlsy avatar Aug 09 '22 16:08 allenlsy

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

steeling avatar Aug 09 '22 16:08 steeling

We can have a subtasks list here:

  • [ ] one script to setup environment on two existing clusters. The scripts creates k8s resources required for the development of OSM multicluster features
  • [ ] CLI tool to manage the multicluster environment, e.g. osm import-service, osm export-service etc. This provide us a smooth process to further custom the environment.

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.

allenlsy avatar Aug 12 '22 18:08 allenlsy