Documentation ¶
Index ¶
- type Controller
- func (c *Controller) ClusterDatabasesMap() map[string][]string
- func (c *Controller) ClusterHistory(team, namespace, name string) ([]*spec.Diff, error)
- func (c *Controller) ClusterLogs(team, namespace, name string) ([]*spec.LogEntry, error)
- func (c *Controller) ClusterStatus(team, namespace, cluster string) (*spec.ClusterStatus, error)
- func (c *Controller) Fire(e *logrus.Entry) error
- func (c *Controller) GetConfig() *spec.ControllerConfig
- func (c *Controller) GetOperatorConfig() *config.Config
- func (c *Controller) GetStatus() *spec.ControllerStatus
- func (c *Controller) GetWorkersCnt() uint32
- func (c *Controller) Levels() []logrus.Level
- func (c *Controller) ListQueue(workerID uint32) (*spec.QueueDump, error)
- func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup)
- func (c *Controller) TeamClusterList() map[string][]spec.NamespacedName
- func (c *Controller) WorkerLogs(workerID uint32) ([]*spec.LogEntry, error)
- func (c *Controller) WorkerStatus(workerID uint32) (*spec.WorkerStatus, error)
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) 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