Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCollectionNotFound = errors.New("collection not found")
View Source
var ErrInvalidWorkload = errors.New("supplied workload is invalid")
Functions ¶
Types ¶
type Reconciler ¶
type Reconciler interface {
client.Client
// attribute exporters and setters
GetController() controller.Controller
GetManager() manager.Manager
GetLogger() logr.Logger
GetResources(*Request) ([]client.Object, error)
GetEventRecorder() record.EventRecorder
GetFieldManager() string
GetWatches() []client.Object
SetWatch(client.Object)
// custom methods which are managed by consumers
CheckReady(*Request) (bool, error)
Mutate(*Request, client.Object) ([]client.Object, bool, error)
}
Reconciler acts as a client and state holder of the controller for use within the rconciliation loop.
type Request ¶
type Request struct {
Context context.Context
Workload Workload
Collection Workload
Resources []client.Object
Log logr.Logger
}
Request holds the state of the current reconcile request. This Object can be used to pass state such as context between phases of the controller.
type Workload ¶
type Workload interface {
client.Object
GetWorkloadGVK() schema.GroupVersionKind
GetDependencies() []Workload
GetDependencyStatus() bool
GetReadyStatus() bool
GetPhaseConditions() []*status.PhaseCondition
GetChildResourceConditions() []*status.ChildResource
SetReadyStatus(bool)
SetDependencyStatus(bool)
SetPhaseCondition(*status.PhaseCondition)
SetChildResourceCondition(*status.ChildResource)
}
Workload represents a Custom Resource that your controller is watching.
Click to show internal directories.
Click to hide internal directories.