manager

package
v4.5.1-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrReconcileRBAC defines the error string that is displayed when RBAC reconciliation is
	// enabled for the current PostgreSQL Operator installation but the Operator is unable to
	// to properly/fully reconcile its own RBAC in a target namespace.
	ErrReconcileRBAC = "operator is unable to reconcile RBAC resource"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerManager

type ControllerManager struct {
	// contains filtered or unexported fields
}

ControllerManager manages a map of controller groups, each of which is comprised of the various controllers needed to handle events within a specific namespace. Only one controllerGroup is allowed per namespace.

func NewControllerManager

func NewControllerManager(namespaces []string,
	pgoConfig config.PgoConfig, pgoNamespace, installationName string,
	namespaceOperatingMode ns.NamespaceOperatingMode) (*ControllerManager, error)

NewControllerManager returns a new ControllerManager comprised of controllerGroups for each namespace included in the 'namespaces' parameter.

func (*ControllerManager) AddAndRunGroup

func (c *ControllerManager) AddAndRunGroup(namespace string) error

AddAndRunGroup is a convenience function that adds a controller group for the namespace specified, and then immediately runs the controllers in that group.

func (*ControllerManager) AddGroup

func (c *ControllerManager) AddGroup(namespace string) error

AddGroup adds a new controller group for the namespace specified. Each controller group is comprised of controllers for the following resources: - pods - jobs - pgclusters - pgpolicys - pgtasks Two SharedInformerFactory's are utilized (one for Kube resources and one for PosgreSQL Operator resources) to create and track the informers for each type of resource, while any controllers utilizing worker queues are also tracked (this allows all informers and worker queues to be easily started as needed). Each controller group also receives its own clients, which can then be utilized by the various controllers within that controller group.

func (*ControllerManager) RemoveAll

func (c *ControllerManager) RemoveAll()

RemoveAll removes all controller groups managed by the controller manager, first stopping all controllers within each controller group managed by the controller manager.

func (*ControllerManager) RemoveGroup

func (c *ControllerManager) RemoveGroup(namespace string)

RemoveGroup removes the controller group for the namespace specified, first stopping all controllers within that group

func (*ControllerManager) RunAll

func (c *ControllerManager) RunAll() error

RunAll runs all controllers across all controller groups managed by the controller manager.

func (*ControllerManager) RunGroup

func (c *ControllerManager) RunGroup(namespace string) error

RunGroup runs the controllers within the controller group for the namespace specified.

Jump to

Keyboard shortcuts

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