Documentation
¶
Index ¶
- type Client
- func (d *Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (d *Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (d *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (d *Client) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (d *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (d *Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (d *Client) RESTMapper() apimeta.RESTMapper
- func (d *Client) Scheme() *runtime.Scheme
- func (d *Client) Status() client.StatusWriter
- func (d *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) 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(src source.Source, 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(rawGVK schema.GroupVersionKind, rest ...schema.GroupVersionKind) *ControllerBuilder
- type ForInput
- type Lister
- type ListerBuilder
- type ListerImpl
- type Object
- type OwnsInput
- type Reconciler
- type ReconcilerBuilder
- type WatchesInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteAllOf ¶
func (*Client) List ¶
func (d *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*Client) RESTMapper ¶
func (d *Client) RESTMapper() apimeta.RESTMapper
RESTMapper returns the rest this client is using.
func (*Client) Status ¶
func (d *Client) Status() client.StatusWriter
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(rawGVK schema.GroupVersionKind) *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(src source.Source, 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(rawGVK schema.GroupVersionKind, rest ...schema.GroupVersionKind) *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(gvk schema.GroupVersionKind) (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) WithUnderlyingType ¶
func (b *ListerBuilder) WithUnderlyingType(rawGVK schema.GroupVersionKind, rest ...schema.GroupVersionKind) *ListerBuilder
type ListerImpl ¶
type ListerImpl struct {
// contains filtered or unexported fields
}
func (*ListerImpl) Client ¶
func (d *ListerImpl) Client(gvk schema.GroupVersionKind) (client.Client, error)
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 Reconciler ¶
type Reconciler interface { reconcile.Reconciler inject.Client }
type ReconcilerBuilder ¶
type ReconcilerBuilder func() Reconciler
type WatchesInput ¶
type WatchesInput struct {
// contains filtered or unexported fields
}
WatchesInput represents the information set by Watches method.