The broadcaster is in charge of sending to other clusters the
Advertisement CR, containing the resources made available
for sharing and (optionally) their prices.
It is created after the reception of a
PeeringRequest from a foreign cluster, which is requesting some resources.
After having created the Advertisement on the remote cluster, the broadcaster starts watching it, to know the events that occur over it (e.g. the Advertisement has been accepted/refused).
Dynamic computation of the shared resources:
The computation of the resources shared through the Advertisement considers the following parameters:
SharedResources = (TotalAvailability - TotalUsageByPods) * SharingPercentage
Periodic creation of the Advertisement:
The Advertisement is sent every 10 minutes to the foreign cluster.
Dynamic creation of the Advertisement when the configuration changes:
The broadcaster watches the
ClusterConfig CR: when the sharing percentage is modified, it creates an Advertisement with
the new amount of resources and immediately pushes it on the foreign cluster, without waiting for the periodic creation.
PeeringRequestis created by the foreign cluster: a broadcaster deployment is launched.
ClusterConfigCR to get the resources to be advertised.
Advertisementwith the computed resources.
Secretwith the needed permissions for sharing (i.e. define which operations are allowed on which resources).
Advertisementon the foreign cluster and start watching it.
Advertisementis modified by foreign cluster modules (for example to notify the Advertisement has been accepted), the watcher is triggered and, if needed, reacts in some way.