Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceList ¶
type ResourceList struct { // the desired resources should share the given labels Resources []ezkube.Object // list function that will be used to compare the given resources to the currently existing state. // if the resources in the list do not match those returned by the list func, // the differences will be reconciled by applying the snapshot. // if this function is nil, no garbage collection will be done. ListFunc func(ctx context.Context, cli client.Client) ([]ezkube.Object, error) }
a ResourceList define a list of resources we wish to write to kubernetes. A ListFunc can be provided to compare the resources with what is currently written to storage and trim stale resources. A transition function can also be provided for updating existing resources.
func (ResourceList) SplitByClusterName ¶
func (l ResourceList) SplitByClusterName() map[string]ResourceList
partition the resource list by the ClusterName of each object.
type Snapshot ¶
type Snapshot struct { // name of the snapshot, used for metrics Name string ListsToSync []ResourceList }
an Output Snapshot defines a list of desired resources to apply to Kubernetes. Stale resources (resources with no parents) will be garbage collected.
A resources is determined to be stale when it currently exists in the cluster, but does not exist in the snapshot.
func (Snapshot) SyncMultiCluster ¶
sync the output snapshot to storage across multiple clusters. uses the object's ClusterName to determine the correct destination cluster.