Documentation ¶
Index ¶
- Constants
- Variables
- type Cluster
- type Controller
- func (c *Controller) CreateClientService(cl *Cluster) error
- func (c *Controller) CreatePeerService(cl *Cluster) error
- func (c *Controller) EnsureCustomResourceDefinitions() error
- func (c *Controller) GetDatabase(meta metav1.ObjectMeta) (runtime.Object, error)
- func (c *Controller) GetSnapshotter(snapshot *api.Snapshot) (*batch.Job, error)
- func (c *Controller) Init() error
- func (c Controller) NewCluster(etcd *api.Etcd)
- func (c *Controller) Run(stopCh <-chan struct{})
- func (c *Controller) RunControllers(stopCh <-chan struct{})
- func (c *Controller) SetDatabaseStatus(meta metav1.ObjectMeta, phase api.DatabasePhase, reason string) error
- func (c *Controller) StartAndRunControllers(stopCh <-chan struct{})
- func (c *Controller) UpsertDatabaseAnnotation(meta metav1.ObjectMeta, annotation map[string]string) error
- func (c *Controller) ValidateSnapshot(snapshot *api.Snapshot) error
- func (c *Controller) WaitUntilPaused(drmn *api.DormantDatabase) error
- func (c *Controller) WipeOutDatabase(drmn *api.DormantDatabase) error
- func (c *Controller) WipeOutSnapshot(snapshot *api.Snapshot) error
- type Event
- type OperatorConfig
Constants ¶
View Source
const ( // EtcdClientPort is the client port on client service and etcd nodes. EtcdClientPort = 2379 EtcdPeerPort = 2380 ExporterSecretPath = "/var/run/secrets/kubedb.com/" )
View Source
const ( KeyEtcdUser = "user" KeyEtcdPassword = "password" )
View Source
const TolerateUnreadyEndpointsAnnotation = "service.alpha.kubernetes.io/tolerate-unready-endpoints"
Variables ¶
View Source
var ErrLostQuorum = errors.New("lost quorum")
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { amc.Config *amc.Controller // contains filtered or unexported fields }
func New ¶
func New( clientConfig *rest.Config, client kubernetes.Interface, apiExtKubeClient crd_cs.ApiextensionsV1beta1Interface, extClient cs.Interface, dc dynamic.Interface, appCatalogClient appcat_cs.AppcatalogV1alpha1Interface, promClient pcm.MonitoringV1Interface, cronController snapc.CronControllerInterface, opt amc.Config, recorder record.EventRecorder, ) *Controller
func (*Controller) CreateClientService ¶
func (c *Controller) CreateClientService(cl *Cluster) error
func (*Controller) CreatePeerService ¶
func (c *Controller) CreatePeerService(cl *Cluster) error
func (*Controller) EnsureCustomResourceDefinitions ¶
func (c *Controller) EnsureCustomResourceDefinitions() error
EnsureCustomResourceDefinitions ensures CRD for MySQl, DormantDatabase and Snapshot
func (*Controller) GetDatabase ¶
func (c *Controller) GetDatabase(meta metav1.ObjectMeta) (runtime.Object, error)
func (*Controller) GetSnapshotter ¶
func (*Controller) Init ¶
func (c *Controller) Init() error
InitInformer initializes Etcd, DormantDB amd Snapshot watcher
func (Controller) NewCluster ¶
func (c Controller) NewCluster(etcd *api.Etcd)
func (*Controller) Run ¶
func (c *Controller) Run(stopCh <-chan struct{})
Blocks caller. Intended to be called as a Go routine.
func (*Controller) RunControllers ¶
func (c *Controller) RunControllers(stopCh <-chan struct{})
RunControllers runs queue.worker
func (*Controller) SetDatabaseStatus ¶
func (c *Controller) SetDatabaseStatus(meta metav1.ObjectMeta, phase api.DatabasePhase, reason string) error
func (*Controller) StartAndRunControllers ¶
func (c *Controller) StartAndRunControllers(stopCh <-chan struct{})
StartAndRunControllers starts InformetFactory and runs queue.worker
func (*Controller) UpsertDatabaseAnnotation ¶
func (c *Controller) UpsertDatabaseAnnotation(meta metav1.ObjectMeta, annotation map[string]string) error
func (*Controller) ValidateSnapshot ¶
func (c *Controller) ValidateSnapshot(snapshot *api.Snapshot) error
func (*Controller) WaitUntilPaused ¶
func (c *Controller) WaitUntilPaused(drmn *api.DormantDatabase) error
func (*Controller) WipeOutDatabase ¶
func (c *Controller) WipeOutDatabase(drmn *api.DormantDatabase) error
func (*Controller) WipeOutSnapshot ¶
func (c *Controller) WipeOutSnapshot(snapshot *api.Snapshot) error
type OperatorConfig ¶
type OperatorConfig struct { amc.Config ClientConfig *rest.Config KubeClient kubernetes.Interface APIExtKubeClient crd_cs.ApiextensionsV1beta1Interface DBClient cs.Interface DynamicClient dynamic.Interface AppCatalogClient appcat_cs.AppcatalogV1alpha1Interface PromClient pcm.MonitoringV1Interface CronController snapc.CronControllerInterface }
func NewOperatorConfig ¶
func NewOperatorConfig(clientConfig *rest.Config) *OperatorConfig
func (*OperatorConfig) New ¶
func (c *OperatorConfig) New() (*Controller, error)
Click to show internal directories.
Click to hide internal directories.