manager

package
v0.0.0-...-122bef5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeManager

type FakeManager struct {
	*Manager

	// allow to push a fake config
	Cfg *rest.Config
	// contains filtered or unexported fields
}

FakeManager is a fake manager that is used for testing.

func NewFakeManager

func NewFakeManager(opts manager.Options, objs ...client.Object) (*FakeManager, error)

NewFakeManager creates a new fake manager.

func (*FakeManager) GetCompositeCache

func (m *FakeManager) GetCompositeCache() *composite.CompositeCache

func (*FakeManager) GetManager

func (m *FakeManager) GetManager() manager.Manager

func (*FakeManager) GetObjectTracker

func (m *FakeManager) GetObjectTracker() testing.ObjectTracker

func (*FakeManager) GetRuntimeCache

func (m *FakeManager) GetRuntimeCache() *composite.FakeRuntimeCache

func (*FakeManager) GetRuntimeClient

func (m *FakeManager) GetRuntimeClient() client.WithWatch

func (*FakeManager) GetRuntimeManager

func (m *FakeManager) GetRuntimeManager() manager.Manager

type FakeRuntimeManager

type FakeRuntimeManager struct {
	Client client.Client
	Cache  cache.Cache
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

FakeRuntimeManager is a runtime manager fake.

func NewFakeRuntimeManager

func NewFakeRuntimeManager(cache cache.Cache, client client.Client, logger logr.Logger) *FakeRuntimeManager

func (*FakeRuntimeManager) Add

func (f *FakeRuntimeManager) Add(runnable manager.Runnable) error

func (*FakeRuntimeManager) AddHealthzCheck

func (f *FakeRuntimeManager) AddHealthzCheck(name string, check healthz.Checker) error

func (*FakeRuntimeManager) AddMetricsServerExtraHandler

func (f *FakeRuntimeManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error

func (*FakeRuntimeManager) AddReadyzCheck

func (f *FakeRuntimeManager) AddReadyzCheck(name string, check healthz.Checker) error

func (*FakeRuntimeManager) Elected

func (f *FakeRuntimeManager) Elected() <-chan struct{}

func (*FakeRuntimeManager) GetAPIReader

func (f *FakeRuntimeManager) GetAPIReader() client.Reader

func (*FakeRuntimeManager) GetCache

func (f *FakeRuntimeManager) GetCache() cache.Cache

func (*FakeRuntimeManager) GetClient

func (f *FakeRuntimeManager) GetClient() client.Client

func (*FakeRuntimeManager) GetConfig

func (f *FakeRuntimeManager) GetConfig() *rest.Config

func (*FakeRuntimeManager) GetControllerOptions

func (f *FakeRuntimeManager) GetControllerOptions() config.Controller

func (*FakeRuntimeManager) GetEventRecorderFor

func (f *FakeRuntimeManager) GetEventRecorderFor(name string) record.EventRecorder

func (*FakeRuntimeManager) GetFieldIndexer

func (f *FakeRuntimeManager) GetFieldIndexer() client.FieldIndexer

func (*FakeRuntimeManager) GetHTTPClient

func (f *FakeRuntimeManager) GetHTTPClient() *http.Client

func (*FakeRuntimeManager) GetLogger

func (f *FakeRuntimeManager) GetLogger() logr.Logger

func (*FakeRuntimeManager) GetRESTMapper

func (f *FakeRuntimeManager) GetRESTMapper() meta.RESTMapper

func (*FakeRuntimeManager) GetScheme

func (f *FakeRuntimeManager) GetScheme() *runtime.Scheme

func (*FakeRuntimeManager) GetWebhookServer

func (f *FakeRuntimeManager) GetWebhookServer() webhook.Server

func (*FakeRuntimeManager) SetFields

func (f *FakeRuntimeManager) SetFields(i interface{}) error

func (*FakeRuntimeManager) Start

func (f *FakeRuntimeManager) Start(ctx context.Context) error

type Manager

type Manager struct {
	manager.Manager
}

Manager is a wrapper around the controller-runtime Manager. The main difference is a custom split cache: only native objects are managed by the API server, view objects are served from a special view cache. The client returned by the GetClient call is smart enough to know when to send requests to the API server (via the default cache) and when to use the view cache.

func New

func New(config *rest.Config, opts Options) (*Manager, error)

New creates a new manager.

type Options

type Options struct {
	manager.Options

	// Manager is a controller runtime manager. If set, the dmanager will wrap the specified
	// manager instead of creating a new one.
	Manager manager.Manager
}

Options provides various settings to custimize the manager. Most options come verbatim from the controller runtime package.

type Runnable

type Runnable interface {
	manager.Runnable
	GetName() string
}

Runnable is something that can be run.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL