Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientNotConfiguredErr = errors.New("manager client not configured")
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
// Managed returns all Kubernetes objects managed by the Manager.
// It is safe to call this method on non-initialized Manager.
Managed() []client.Object
// Execute executes the overall workflow. It will interact with Kubernetes API,
// so make sure to use WithClient before execution.
// If the client is not set, it returns ClientNotConfiguredErr error.
Execute(ctx context.Context, plant *apiv1.Plant) ([]resource.ExecuteResult, error)
// Client returns the current Manager Kubernetes client
Client() client.Client
// WithClient sets the current Manager Client. Must be called before Run.
WithClient(client client.Client) Manager
}
Manager runs required workflow without modifying the Plant object. It abstracts the operator execution from configuration and simplifies the overall dependency management. TODO: Tests can use mocked Manager interface
func NewManager ¶
func NewManager() Manager
NewManager creates a bare Manager. Before executing Manager.Run, make sure to configure client via Manager.WithClient
Click to show internal directories.
Click to hide internal directories.