Version: v0.0.0-...-545e74e Latest Latest

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 69 Imported by: 0




View Source
const (
	// EtcdClientPort is the client port on client service and etcd nodes.
	EtcdClientPort = 2379
	EtcdPeerPort   = 2380

	ExporterSecretPath = "/var/run/secrets/"
View Source
const (
	KeyEtcdUser     = "user"
	KeyEtcdPassword = "password"
View Source
const TolerateUnreadyEndpointsAnnotation = ""


View Source
var ErrLostQuorum = errors.New("lost quorum")


This section is empty.


type Cluster

type Cluster struct {
	// contains filtered or unexported fields

func (*Cluster) Delete

func (c *Cluster) Delete()

func (*Cluster) Update

func (c *Cluster) Update(cl *api.Etcd)

type Controller

type Controller struct {
	// 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 (c *Controller) GetSnapshotter(snapshot *api.Snapshot) (*batch.Job, error)

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 Event

type Event struct {
	Type   kwatch.EventType
	Object *api.Etcd

type OperatorConfig

type OperatorConfig struct {

	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)

Jump to

Keyboard shortcuts

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