controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	KubeClient k8sutil.KubernetesClient

	PodServiceAccount            *v1.ServiceAccount
	PodServiceAccountRoleBinding *rbacv1beta1.RoleBinding
	// contains filtered or unexported fields
}

Controller represents operator controller

func NewController

func NewController(controllerConfig *spec.ControllerConfig) *Controller

NewController creates a new controller

func (*Controller) ClusterDatabasesMap

func (c *Controller) ClusterDatabasesMap() map[string][]string

ClusterDatabasesMap returns for each cluster the list of databases running there

func (*Controller) ClusterHistory

func (c *Controller) ClusterHistory(team, namespace, name string) ([]*spec.Diff, error)

ClusterHistory dumps history of cluster changes

func (*Controller) ClusterLogs

func (c *Controller) ClusterLogs(team, namespace, name string) ([]*spec.LogEntry, error)

ClusterLogs dumps cluster ring logs

func (*Controller) ClusterStatus

func (c *Controller) ClusterStatus(team, namespace, cluster string) (*spec.ClusterStatus, error)

ClusterStatus provides status of the cluster

func (*Controller) Fire

func (c *Controller) Fire(e *logrus.Entry) error

Fire is a logrus hook

func (*Controller) GetConfig

func (c *Controller) GetConfig() *spec.ControllerConfig

GetConfig returns controller config

func (*Controller) GetOperatorConfig

func (c *Controller) GetOperatorConfig() *config.Config

GetOperatorConfig returns operator config

func (*Controller) GetStatus

func (c *Controller) GetStatus() *spec.ControllerStatus

GetStatus dumps current config and status of the controller

func (*Controller) GetWorkersCnt

func (c *Controller) GetWorkersCnt() uint32

GetWorkersCnt returns number of the workers

func (*Controller) Levels

func (c *Controller) Levels() []logrus.Level

Levels returns logrus levels for which hook must fire

func (*Controller) ListQueue

func (c *Controller) ListQueue(workerID uint32) (*spec.QueueDump, error)

ListQueue dumps cluster event queue of the provided worker

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup)

Run starts background controller processes

func (*Controller) TeamClusterList

func (c *Controller) TeamClusterList() map[string][]spec.NamespacedName

TeamClusterList returns team-clusters map

func (*Controller) WorkerLogs

func (c *Controller) WorkerLogs(workerID uint32) ([]*spec.LogEntry, error)

WorkerLogs dumps logs of the worker

func (*Controller) WorkerStatus

func (c *Controller) WorkerStatus(workerID uint32) (*spec.WorkerStatus, error)

WorkerStatus provides status of the worker

Jump to

Keyboard shortcuts

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