Module would provide objects to fx for dependency injection.
var Module = fx.Provide( NewOption, NewClient, NewClientSet, NewManager, NewAuthCli, NewScheme, NewConfig, NewNoCacheReader, NewControlPlaneCacheReader, )
func NewAuthCli(cfg *rest.Config) (*authorizationv1.AuthorizationV1Client, error)
NewAuthCli would build the authorizationv1.AuthorizationV1Client with given parameters.
func NewClient(mgr ctrl.Manager, scheme *runtime.Scheme) (client.Client, error)
NewClient would build the controller-runtime client.Client with given parameters.
func NewClientSet(config *rest.Config) (*kubernetes.Clientset, error)
func NewConfig() *rest.Config
NewConfig would fetch the rest.Config from environment. When it failed to fetch config, it would exit the whole application.
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(options *ctrl.Options, cfg *rest.Config) (ctrl.Manager, error)
NewManager would build the controller-runtime manager with the given parameters.
func NewNoCacheReader(mgr ctrl.Manager) noCacheReader
NewNoCacheReader builds a client.Reader with no cache. TODO: we could return with fx.Annotate instead of struct noCacheReader and magic name "no-cache"
func NewOption(logger logr.Logger, scheme *runtime.Scheme) *ctrl.Options
NewOption returns the manager.Options for build the controller-runtime Manager
func NewScheme() *runtime.Scheme
NewScheme returns the runtime.Scheme used by controller-runtime
type UpdatedClient struct {
// contains filtered or unexported fields
}
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, opts ...client.GetOption) error
func (c *UpdatedClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
func (c *UpdatedClient) IsObjectNamespaced(obj runtime.Object) (bool, 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, opts ...client.PatchOption) 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 struct {
// contains filtered or unexported fields
}
func (c *UpdatedStatusWriter) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) error
func (c *UpdatedStatusWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error
func (c *UpdatedStatusWriter) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error