Documentation ¶
Index ¶
- Variables
- type CRDReplicatorReconciler
- func (d *CRDReplicatorReconciler) AddedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource)
- func (d *CRDReplicatorReconciler) CreateResource(client dynamic.Interface, gvr schema.GroupVersionResource, ...) error
- func (d *CRDReplicatorReconciler) DeleteResource(client dynamic.Interface, gvr schema.GroupVersionResource, ...) error
- func (d *CRDReplicatorReconciler) DeletedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource)
- func (d *CRDReplicatorReconciler) GetConfig(cfg *configv1alpha1.ClusterConfig) []schema.GroupVersionResource
- func (d *CRDReplicatorReconciler) GetRemovedResources(resources []schema.GroupVersionResource) []string
- func (d *CRDReplicatorReconciler) GetResource(client dynamic.Interface, gvr schema.GroupVersionResource, ...) (*unstructured.Unstructured, bool, error)
- func (d *CRDReplicatorReconciler) LocalWatcher(gvr schema.GroupVersionResource, stop chan bool, remoteClusterID string)
- func (d *CRDReplicatorReconciler) ModifiedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource)
- func (d *CRDReplicatorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)
- func (d *CRDReplicatorReconciler) RemoteResourceModifiedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource, ...)
- func (d *CRDReplicatorReconciler) RemoteWatcher(dynClient dynamic.Interface, gvr schema.GroupVersionResource, stop chan bool, ...)
- func (d *CRDReplicatorReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (d *CRDReplicatorReconciler) StartWatchers()
- func (d *CRDReplicatorReconciler) StopWatchers()
- func (d *CRDReplicatorReconciler) UpdateConfig(cfg *configv1alpha1.ClusterConfig)
- func (d *CRDReplicatorReconciler) UpdateLabels(labels map[string]string) map[string]string
- func (d *CRDReplicatorReconciler) UpdateMetadata(client dynamic.Interface, gvr schema.GroupVersionResource, ...) error
- func (d *CRDReplicatorReconciler) UpdateResource(client dynamic.Interface, gvr schema.GroupVersionResource, ...) error
- func (d *CRDReplicatorReconciler) UpdateSpec(client dynamic.Interface, gvr schema.GroupVersionResource, ...) error
- func (d *CRDReplicatorReconciler) UpdateStatus(client dynamic.Interface, gvr schema.GroupVersionResource, ...) error
- func (d *CRDReplicatorReconciler) WatchConfiguration(config *rest.Config, gv *schema.GroupVersion) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LocalLabelSelector = "liqo.io/replication" RemoteLabelSelector = "liqo.io/originID" DestinationLabel = "liqo.io/remoteID" ReplicationStatuslabel = "liqo.io/replicated" )
Functions ¶
This section is empty.
Types ¶
type CRDReplicatorReconciler ¶
type CRDReplicatorReconciler struct { Scheme *runtime.Scheme client.Client ClientSet *kubernetes.Clientset ClusterID string //for each remote cluster we save dynamic client connected to its API server RemoteDynClients map[string]dynamic.Interface //dynamic client pointing to the local API server LocalDynClient dynamic.Interface //a list of GVRs of resources to be replicated RegisteredResources []schema.GroupVersionResource //each time a resource is removed from the configuration it is saved in this list, //it stays here until the associated watcher, if running, is stopped UnregisteredResources []string //for each peering cluster we save all the running watchers monitoring the local resources:(clusterID, (registeredResource, chan)) LocalWatchers map[string]map[string]chan bool //for each peering cluster we save all the running watchers monitoring the replicated resources:(clusterID, (registeredResource, chan)) RemoteWatchers map[string]map[string]chan bool }
func (*CRDReplicatorReconciler) AddedHandler ¶
func (d *CRDReplicatorReconciler) AddedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource)
func (*CRDReplicatorReconciler) CreateResource ¶
func (d *CRDReplicatorReconciler) CreateResource(client dynamic.Interface, gvr schema.GroupVersionResource, obj *unstructured.Unstructured, clusterID string) error
func (*CRDReplicatorReconciler) DeleteResource ¶
func (d *CRDReplicatorReconciler) DeleteResource(client dynamic.Interface, gvr schema.GroupVersionResource, obj *unstructured.Unstructured, clusterID string) error
func (*CRDReplicatorReconciler) DeletedHandler ¶
func (d *CRDReplicatorReconciler) DeletedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource)
func (*CRDReplicatorReconciler) GetConfig ¶
func (d *CRDReplicatorReconciler) GetConfig(cfg *configv1alpha1.ClusterConfig) []schema.GroupVersionResource
func (*CRDReplicatorReconciler) GetRemovedResources ¶
func (d *CRDReplicatorReconciler) GetRemovedResources(resources []schema.GroupVersionResource) []string
func (*CRDReplicatorReconciler) GetResource ¶
func (d *CRDReplicatorReconciler) GetResource(client dynamic.Interface, gvr schema.GroupVersionResource, name, namespace, clusterID string) (*unstructured.Unstructured, bool, error)
func (*CRDReplicatorReconciler) LocalWatcher ¶
func (d *CRDReplicatorReconciler) LocalWatcher(gvr schema.GroupVersionResource, stop chan bool, remoteClusterID string)
func (*CRDReplicatorReconciler) ModifiedHandler ¶
func (d *CRDReplicatorReconciler) ModifiedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource)
func (*CRDReplicatorReconciler) RemoteResourceModifiedHandler ¶
func (d *CRDReplicatorReconciler) RemoteResourceModifiedHandler(obj *unstructured.Unstructured, gvr schema.GroupVersionResource, remoteClusterId string)
func (*CRDReplicatorReconciler) RemoteWatcher ¶
func (d *CRDReplicatorReconciler) RemoteWatcher(dynClient dynamic.Interface, gvr schema.GroupVersionResource, stop chan bool, remoteClusterID string)
func (*CRDReplicatorReconciler) SetupWithManager ¶
func (d *CRDReplicatorReconciler) SetupWithManager(mgr ctrl.Manager) error
func (*CRDReplicatorReconciler) StartWatchers ¶
func (d *CRDReplicatorReconciler) StartWatchers()
func (*CRDReplicatorReconciler) StopWatchers ¶
func (d *CRDReplicatorReconciler) StopWatchers()
Stops all the watchers for the resources that have been unregistered
func (*CRDReplicatorReconciler) UpdateConfig ¶
func (d *CRDReplicatorReconciler) UpdateConfig(cfg *configv1alpha1.ClusterConfig)
func (*CRDReplicatorReconciler) UpdateLabels ¶
func (d *CRDReplicatorReconciler) UpdateLabels(labels map[string]string) map[string]string
func (*CRDReplicatorReconciler) UpdateMetadata ¶
func (d *CRDReplicatorReconciler) UpdateMetadata(client dynamic.Interface, gvr schema.GroupVersionResource, obj *unstructured.Unstructured, clusterID string, m metav1.ObjectMeta) error
updates the following field of metadata: labels
func (*CRDReplicatorReconciler) UpdateResource ¶
func (d *CRDReplicatorReconciler) UpdateResource(client dynamic.Interface, gvr schema.GroupVersionResource, obj *unstructured.Unstructured, clusterID string) error
func (*CRDReplicatorReconciler) UpdateSpec ¶
func (d *CRDReplicatorReconciler) UpdateSpec(client dynamic.Interface, gvr schema.GroupVersionResource, obj *unstructured.Unstructured, clusterID string, spec map[string]interface{}) error
updates the spec field of a resource
func (*CRDReplicatorReconciler) UpdateStatus ¶
func (d *CRDReplicatorReconciler) UpdateStatus(client dynamic.Interface, gvr schema.GroupVersionResource, obj *unstructured.Unstructured, clusterID string, status map[string]interface{}) error
updates the status field of a resource
func (*CRDReplicatorReconciler) WatchConfiguration ¶
func (d *CRDReplicatorReconciler) WatchConfiguration(config *rest.Config, gv *schema.GroupVersion) error
Click to show internal directories.
Click to hide internal directories.