Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoteNameForLocalObject ¶
func RemoteNameForLocalObject(localObj ctrlruntimeclient.Object) *reconcile.Request
Types ¶
type ObjectStateStore ¶
type ObjectStateStore interface { Get(source syncSide) (*unstructured.Unstructured, error) Put(obj *unstructured.Unstructured, clusterName string, subresources []string) error }
type ResourceSyncer ¶
type ResourceSyncer struct {
// contains filtered or unexported fields
}
func NewResourceSyncer ¶
func NewResourceSyncer( log *zap.SugaredLogger, localClient ctrlruntimeclient.Client, remoteClient ctrlruntimeclient.Client, pubRes *syncagentv1alpha1.PublishedResource, localCRD *apiextensionsv1.CustomResourceDefinition, remoteAPIGroup string, mutator mutation.Mutator, stateNamespace string, ) (*ResourceSyncer, error)
func (*ResourceSyncer) Process ¶
func (s *ResourceSyncer) Process(ctx Context, remoteObj *unstructured.Unstructured) (requeue bool, err error)
Process is the primary entrypoint for object synchronization. This function will create/update the local primary object (i.e. the copy of the remote object), sync any local status back to the remote object and then also synchronize all related resources. It also handles object deletion and will clean up the local objects when a remote object is gone. Each of these steps can potentially end the current processing and return (true, nil). In this case, the caller should re-fetch the remote object and call Process() again (most likely in the next reconciliation). Only when (false, nil) is returned is the entire process finished.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
apis
|
|
dummy/v1alpha1
+groupName=dummy.example.com +versionName=v1alpha1 +kubebuilder:object:generate=true
|
+groupName=dummy.example.com +versionName=v1alpha1 +kubebuilder:object:generate=true |
Click to show internal directories.
Click to hide internal directories.