Hi Tim,
Here are my thoughts on the ServiceImport resource in MCS. This
doesn't necessarily encompass everything and I might have forgotten
some details too.
A ServiceImport does the following things:
- It exposes the resulting Service properties from all constituent
exported Services
- It includes the IP addresses allocated for this ServiceImport, which
could be the same for every cluster or different for each
- It includes the list of clusters exporting this Service
- It allows exposing any import problem/info within its status
conditions (one of which could be IP protocol incompatibility)
- It's auto-managed/created by the MCS implementation itself, which
allows a cluster only consuming some service without exporting it to
not have to create (almost) any additional resources
As a consequence of some of the points above, it does not directly
modify any existing Service behaviors. This is mainly because of the
IPs allocated on the ServiceImport and the fact that we use a
different DNS domain (typically clusterset.local).
Also note that we do not prescribe what happens when a Namespace does
not exist at the KEP level (implementations may or may not choose to
auto-create the namespace, and the different conditions and behavior
around this).
It's not mentioned explicitly in the KEP, but it's also probably
reasonable that an implementation could have some kind of policy (for
instance, a namespace annotation or some CRD) to have additional
control over what namespaces are allowed to export/import Services.
The most important parts of the ServiceImport are probably its IP and
type (headless/non-headless), and at least for headless ServiceImports
the related EndpointSlices. The rest could technically be skipped but
could still be useful when a user wants more visibility into what is
happening. It could also be required depending on how some third-party
controller is integrating with MCS (for instance, if a Gateway is
using the EndpointSlice directly, it should then be able to know the
different Service properties).
Hopefully this helps clarify the purpose of ServiceImport in MCS. Feel
free to join our weekly SIG-MC calls if you want to discuss this
further with other folks too!
Cheers,
--
Arthur Outhenin-Chalandre