controller

package
v0.13.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: Apache-2.0 Imports: 67 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PostgresUser     = "POSTGRES_USER"
	PostgresPassword = "POSTGRES_PASSWORD"
)
View Source
const (
	PostgresPort     = 5432
	PostgresPortName = "api"
)

Variables

View Source
var (
	NodeRole = "kubedb.com/role"
)

Functions

func WalDataDir

func WalDataDir(postgres *api.Postgres) string

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,
	stashClient scs.Interface,
	dc dynamic.Interface,
	appCatalogClient appcat_cs.AppcatalogV1alpha1Interface,
	promClient pcm.MonitoringV1Interface,
	cronController snapc.CronControllerInterface,
	opt amc.Config,
	recorder record.EventRecorder,
) *Controller

func (*Controller) CheckStatefulSetPodStatus

func (c *Controller) CheckStatefulSetPodStatus(statefulSet *apps.StatefulSet) error

func (*Controller) EnsureCustomResourceDefinitions

func (c *Controller) EnsureCustomResourceDefinitions() error

Ensuring Custom Resource Definitions

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 Postgres, DormantDB amd Snapshot watcher

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

WaitUntilPaused is an Interface of *amc.Controller

func (*Controller) WipeOutDatabase

func (c *Controller) WipeOutDatabase(drmn *api.DormantDatabase) error

WipeOutDatabase is an Interface of *amc.Controller. It verifies and deletes secrets and other left overs of DBs except Snapshot and PVC.

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
	StashClient      scs.Interface
	AppCatalogClient appcat_cs.AppcatalogV1alpha1Interface
	DynamicClient    dynamic.Interface
	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