Documentation ¶
Index ¶
- func NewRawPatch(obj client.Object, patch client.Patch) (client.Patch, error)
- type ClientBuilder
- type ControllerBuilder
- func (blder *ControllerBuilder) Complete(rb ReconcilerBuilder) error
- func (blder *ControllerBuilder) For(object Object, opts ...builder.ForOption) *ControllerBuilder
- func (blder *ControllerBuilder) Named(name string) *ControllerBuilder
- func (blder *ControllerBuilder) Owns(object client.Object, opts ...builder.OwnsOption) *ControllerBuilder
- func (blder *ControllerBuilder) Watches(object client.Object, eventhandler handler.EventHandler, ...) *ControllerBuilder
- func (blder *ControllerBuilder) WithEventFilter(p predicate.Predicate) *ControllerBuilder
- func (blder *ControllerBuilder) WithLogConstructor(logConstructor func(*reconcile.Request) logr.Logger) *ControllerBuilder
- func (blder *ControllerBuilder) WithOptions(options controller.Options) *ControllerBuilder
- func (blder *ControllerBuilder) WithUnderlyingTypes(rawObj client.Object, rest ...client.Object) *ControllerBuilder
- type ForInput
- type Lister
- type ListerBuilder
- type ListerImpl
- type Object
- type OwnsInput
- type RawPatch
- type Reconciler
- type ReconcilerBuilder
- type WatchesInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientBuilder ¶
type ClientBuilder struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient() *ClientBuilder
func (*ClientBuilder) ForDuckType ¶
func (b *ClientBuilder) ForDuckType(obj Object) *ClientBuilder
func (*ClientBuilder) WithUnderlyingType ¶
func (b *ClientBuilder) WithUnderlyingType(obj client.Object) *ClientBuilder
type ControllerBuilder ¶
type ControllerBuilder struct {
// contains filtered or unexported fields
}
ControllerBuilder builds a Controller.
func ControllerManagedBy ¶
func ControllerManagedBy(m manager.Manager) *ControllerBuilder
ControllerManagedBy returns a new controller builder that will be started by the provided Manager.
func (*ControllerBuilder) Complete ¶
func (blder *ControllerBuilder) Complete(rb ReconcilerBuilder) error
Complete builds the Application Controller.
func (*ControllerBuilder) For ¶
func (blder *ControllerBuilder) For(object Object, opts ...builder.ForOption) *ControllerBuilder
For defines the type of Object being *reconciled*, and configures the ControllerManagedBy to respond to create / delete / update events by *reconciling the object*. This is the equivalent of calling Watches(&source.Kind{Type: apiType}, &handler.EnqueueRequestForObject{}).
func (*ControllerBuilder) Named ¶
func (blder *ControllerBuilder) Named(name string) *ControllerBuilder
Named sets the name of the controller to the given name. The name shows up in metrics, among other things, and thus should be a prometheus compatible name (underscores and alphanumeric characters only).
By default, controllers are named using the lowercase version of their kind.
func (*ControllerBuilder) Owns ¶
func (blder *ControllerBuilder) Owns(object client.Object, opts ...builder.OwnsOption) *ControllerBuilder
Owns defines types of Objects being *generated* by the ControllerManagedBy, and configures the ControllerManagedBy to respond to create / delete / update events by *reconciling the owner object*. This is the equivalent of calling Watches(&source.Kind{Type: <ForType-forInput>}, &handler.EnqueueRequestForOwner{OwnerType: apiType, IsController: true}).
func (*ControllerBuilder) Watches ¶
func (blder *ControllerBuilder) Watches(object client.Object, eventhandler handler.EventHandler, opts ...builder.WatchesOption) *ControllerBuilder
Watches exposes the lower-level ControllerManagedBy Watches functions through the builder. Consider using Owns or For instead of Watches directly. Specified predicates are registered only for given source.
func (*ControllerBuilder) WithEventFilter ¶
func (blder *ControllerBuilder) WithEventFilter(p predicate.Predicate) *ControllerBuilder
WithEventFilter sets the event filters, to filter which create/update/delete/generic events eventually trigger reconciliations. For example, filtering on whether the resource version has changed. Given predicate is added for all watched objects. Defaults to the empty list.
func (*ControllerBuilder) WithLogConstructor ¶
func (blder *ControllerBuilder) WithLogConstructor(logConstructor func(*reconcile.Request) logr.Logger) *ControllerBuilder
WithLogConstructor overrides the controller options's LogConstructor.
func (*ControllerBuilder) WithOptions ¶
func (blder *ControllerBuilder) WithOptions(options controller.Options) *ControllerBuilder
WithOptions overrides the controller options use in doController. Defaults to empty.
func (*ControllerBuilder) WithUnderlyingTypes ¶
func (blder *ControllerBuilder) WithUnderlyingTypes(rawObj client.Object, rest ...client.Object) *ControllerBuilder
type ForInput ¶
type ForInput struct {
// contains filtered or unexported fields
}
ForInput represents the information set by For method.
type Lister ¶
type Lister interface { // List retrieves list of objects for a given namespace and list options. On a // successful call, Items field in the list will be populated with the // result returned from the server. List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error Client(obj client.Object) (client.Client, error) }
Lister knows how to list Kubernetes objects.
type ListerBuilder ¶
type ListerBuilder struct {
// contains filtered or unexported fields
}
func NewLister ¶
func NewLister() *ListerBuilder
func (*ListerBuilder) ForDuckType ¶
func (b *ListerBuilder) ForDuckType(obj Object) *ListerBuilder
func (*ListerBuilder) WithUnderlyingTypes ¶ added in v0.25.13
func (b *ListerBuilder) WithUnderlyingTypes(objs client.Object, rest ...client.Object) *ListerBuilder
type ListerImpl ¶
type ListerImpl struct {
// contains filtered or unexported fields
}
func (*ListerImpl) List ¶
func (d *ListerImpl) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*ListerImpl) RESTMapper ¶
func (d *ListerImpl) RESTMapper() apimeta.RESTMapper
RESTMapper returns the rest this client is using.
func (*ListerImpl) Scheme ¶
func (d *ListerImpl) Scheme() *runtime.Scheme
Scheme returns the scheme this client is using.
type OwnsInput ¶
type OwnsInput struct {
// contains filtered or unexported fields
}
OwnsInput represents the information set by Owns method.
type RawPatch ¶ added in v0.30.30
type RawPatch struct {
// contains filtered or unexported fields
}
type Reconciler ¶
type Reconciler interface { reconcile.Reconciler InjectClient(client.Client) error }
type ReconcilerBuilder ¶
type ReconcilerBuilder func() Reconciler
type WatchesInput ¶
type WatchesInput struct {
// contains filtered or unexported fields
}
WatchesInput represents the information set by Watches method.