Documentation ¶
Overview ¶
Package provider provides several required components for bootstrapping chaos-controller-manager.
Index ¶
- Variables
- func NewAuthCli(cfg *rest.Config) (*authorizationv1.AuthorizationV1Client, error)
- func NewClient(mgr ctrl.Manager, scheme *runtime.Scheme) (client.Client, error)
- func NewClientSet(config *rest.Config) (*kubernetes.Clientset, error)
- func NewConfig() *rest.Config
- func NewControlPlaneCacheReader(logger logr.Logger, cfg *rest.Config) (controlPlaneCacheReader, error)
- func NewManager(options *ctrl.Options, cfg *rest.Config) (ctrl.Manager, error)
- func NewNoCacheReader(mgr ctrl.Manager) noCacheReader
- func NewOption(logger logr.Logger, scheme *runtime.Scheme) *ctrl.Options
- func NewScheme() *runtime.Scheme
- type UpdatedClient
- func (c *UpdatedClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *UpdatedClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *UpdatedClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (c *UpdatedClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (c *UpdatedClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c *UpdatedClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (c *UpdatedClient) RESTMapper() meta.RESTMapper
- func (c *UpdatedClient) Scheme() *runtime.Scheme
- func (c *UpdatedClient) Status() client.StatusWriter
- func (c *UpdatedClient) SubResource(subResource string) client.SubResourceClient
- func (c *UpdatedClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type UpdatedStatusWriter
- func (c *UpdatedStatusWriter) Create(ctx context.Context, obj client.Object, subResource client.Object, ...) error
- func (c *UpdatedStatusWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (c *UpdatedStatusWriter) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Provide( NewOption, NewClient, NewClientSet, NewManager, NewAuthCli, NewScheme, NewConfig, NewNoCacheReader, NewControlPlaneCacheReader, )
Module would provide objects to fx for dependency injection.
Functions ¶
func NewAuthCli ¶
func NewAuthCli(cfg *rest.Config) (*authorizationv1.AuthorizationV1Client, error)
NewAuthCli would build the authorizationv1.AuthorizationV1Client with given parameters.
func NewClientSet ¶
func NewClientSet(config *rest.Config) (*kubernetes.Clientset, error)
func NewConfig ¶
NewConfig would fetch the rest.Config from environment. When it failed to fetch config, it would exit the whole application.
func NewControlPlaneCacheReader ¶
func NewControlPlaneCacheReader(logger logr.Logger, cfg *rest.Config) (controlPlaneCacheReader, error)
NewControlPlaneCacheReader builds a client.Reader with cache for certain usage for control plane
func NewManager ¶
NewManager would build the controller-runtime manager with the given parameters.
func NewNoCacheReader ¶
NewNoCacheReader builds a client.Reader with no cache. TODO: we could return with fx.Annotate instead of struct noCacheReader and magic name "no-cache"
Types ¶
type UpdatedClient ¶
type UpdatedClient struct {
// contains filtered or unexported fields
}
func (*UpdatedClient) Create ¶
func (c *UpdatedClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*UpdatedClient) Delete ¶
func (c *UpdatedClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*UpdatedClient) DeleteAllOf ¶
func (c *UpdatedClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
func (*UpdatedClient) List ¶
func (c *UpdatedClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*UpdatedClient) Patch ¶
func (c *UpdatedClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*UpdatedClient) RESTMapper ¶
func (c *UpdatedClient) RESTMapper() meta.RESTMapper
func (*UpdatedClient) Scheme ¶
func (c *UpdatedClient) Scheme() *runtime.Scheme
func (*UpdatedClient) Status ¶
func (c *UpdatedClient) Status() client.StatusWriter
func (*UpdatedClient) SubResource ¶
func (c *UpdatedClient) SubResource(subResource string) client.SubResourceClient
func (*UpdatedClient) Update ¶
func (c *UpdatedClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type UpdatedStatusWriter ¶
type UpdatedStatusWriter struct {
// contains filtered or unexported fields
}
func (*UpdatedStatusWriter) Create ¶
func (c *UpdatedStatusWriter) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) error
func (*UpdatedStatusWriter) Patch ¶
func (c *UpdatedStatusWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error
func (*UpdatedStatusWriter) Update ¶
func (c *UpdatedStatusWriter) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error