Documentation
¶
Index ¶
- func CreateLogger(logLevel int, enableDeveloperMode bool) (logr.Logger, *zap.Logger, error)
- type DefaultSubReconciler
- type LoggingClient
- func (l *LoggingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (l *LoggingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (l *LoggingClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (l *LoggingClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (l *LoggingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
- func (l *LoggingClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (l *LoggingClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (l *LoggingClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (l *LoggingClient) RESTMapper() meta.RESTMapper
- func (l *LoggingClient) Scheme() *runtime.Scheme
- func (l *LoggingClient) Status() client.SubResourceWriter
- func (l *LoggingClient) SubResource(subResource string) client.SubResourceClient
- func (l *LoggingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type LoggingSubResourceClient
- type LoggingSubResourceWriter
- func (l *LoggingSubResourceWriter) Create(ctx context.Context, obj client.Object, subResource client.Object, ...) error
- func (l *LoggingSubResourceWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (l *LoggingSubResourceWriter) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error
- type Reconciler
- type ReconcilerOption
- type SubReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultSubReconciler ¶
type DefaultSubReconciler struct {
// contains filtered or unexported fields
}
DefaultSubReconciler provides fields and methods which are needed for all sub reconcilers. This struct is intended to be embedded into the concrete sub reconciler.
func NewDefaultSubReconciler ¶
func NewDefaultSubReconciler(client client.Client) DefaultSubReconciler
func (*DefaultSubReconciler) GetClient ¶
func (r *DefaultSubReconciler) GetClient() client.Client
func (*DefaultSubReconciler) SetupWithManager ¶
func (r *DefaultSubReconciler) SetupWithManager(ctrlBuilder *builder.Builder) *builder.Builder
type LoggingClient ¶
type LoggingClient struct {
// contains filtered or unexported fields
}
LoggingClient is a Kubernetes client which is creating log entries for every modifying action.
func NewLoggingClient ¶
func NewLoggingClient(client client.Client, logger logr.Logger) *LoggingClient
func (*LoggingClient) Create ¶
func (l *LoggingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*LoggingClient) Delete ¶
func (l *LoggingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*LoggingClient) DeleteAllOf ¶
func (l *LoggingClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
func (*LoggingClient) GroupVersionKindFor ¶
func (l *LoggingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
func (*LoggingClient) IsObjectNamespaced ¶
func (l *LoggingClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
func (*LoggingClient) List ¶
func (l *LoggingClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*LoggingClient) Patch ¶
func (l *LoggingClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*LoggingClient) RESTMapper ¶
func (l *LoggingClient) RESTMapper() meta.RESTMapper
func (*LoggingClient) Scheme ¶
func (l *LoggingClient) Scheme() *runtime.Scheme
func (*LoggingClient) Status ¶
func (l *LoggingClient) Status() client.SubResourceWriter
func (*LoggingClient) SubResource ¶
func (l *LoggingClient) SubResource(subResource string) client.SubResourceClient
func (*LoggingClient) Update ¶
func (l *LoggingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type LoggingSubResourceClient ¶
type LoggingSubResourceClient struct { LoggingSubResourceWriter // contains filtered or unexported fields }
type LoggingSubResourceWriter ¶
type LoggingSubResourceWriter struct {
// contains filtered or unexported fields
}
func (*LoggingSubResourceWriter) Create ¶
func (l *LoggingSubResourceWriter) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) error
func (*LoggingSubResourceWriter) Patch ¶
func (l *LoggingSubResourceWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error
func (*LoggingSubResourceWriter) Update ¶
func (l *LoggingSubResourceWriter) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error
type Reconciler ¶
Reconciler is a generalization of a top level reconciler. The type parameter should be a pointer to the kubernetes data type this reconciler will reconcile. Every reconcile event is then forwarded to all sub reconcilers.
func NewReconciler ¶
func NewReconciler[T client.Object](client client.Client, newObj func() T, options ...ReconcilerOption[T]) *Reconciler[T]
NewReconciler creates a new reconciler instance. The reconciler is initialized with the given client and applies the provided options to the reconciler.
func (*Reconciler[T]) AppendSubReconciler ¶
func (r *Reconciler[T]) AppendSubReconciler(subReconciler SubReconciler[T])
func (*Reconciler[T]) GetClient ¶
func (r *Reconciler[T]) GetClient() client.Client
func (*Reconciler[T]) SetupWithManager ¶
func (r *Reconciler[T]) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers all enabled sub-reconcilers with the given manager.
type ReconcilerOption ¶
type ReconcilerOption[T client.Object] func(reconciler *Reconciler[T])
ReconcilerOption is an option which can be applied to the reconciler.