Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ControllerBuilder directControllerBuilder
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // Delete removes the GCP object. // This can be called without calling Find. // It returns (true, nil) if the object was deleted, // and (false, nil) if the object was not found but should be presumed deleted. // In an error, the state is not fully determined - a delete might be in progress. Delete(ctx context.Context) (deleted bool, err error) // Find must be called as the first operation (unless we are deleting). // It returns whether the corresponding GCP object was found. Find(ctx context.Context) (found bool, err error) // Create creates a new GCP object. // This should only be called when Find has previously returned false. // The implementation should write the updated status into `u`. Create(ctx context.Context, u *unstructured.Unstructured) error // Update updates an existing GCP object. // This should only be called when Find has previously returned true. // The implementation should write the updated status into `u`. Update(ctx context.Context, u *unstructured.Unstructured) error // Export fetches the cloud provider's representation of the object // as an unstructured.Unstructured. // Assumes Find has previously returned true. Export(ctx context.Context) (*unstructured.Unstructured, error) }
Adapter performs a single reconciliation on a single object. It is built using AdapterForObject.
type DirectReconciler ¶
type DirectReconciler struct { lifecyclehandler.LifecycleHandler client.Client metrics.ReconcilerMetrics // contains filtered or unexported fields }
DirectReconciler is a reconciler for reconciling resources that support the Model/Adapter pattern. It is currently an adaptation of the existing terraform based-reconciler, and thus uses things like k8s.Resource. TODO: Move away from k8s.Resource to unstructured.Unstructured.
type Model ¶
type Model interface { // AdapterForObject builds an operation object for reconciling the object u. // If there are references, AdapterForObject should dereference them before returning (using reader) AdapterForObject(ctx context.Context, reader client.Reader, u *unstructured.Unstructured) (Adapter, error) }
Model is the entry-point for our per-object reconcilers
Click to show internal directories.
Click to hide internal directories.