Documentation ¶
Index ¶
- Constants
- Variables
- func WalDataDir(postgres *api.Postgres) string
- type Controller
- func (c *Controller) CheckStatefulSetPodStatus(statefulSet *apps.StatefulSet) 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) 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 OperatorConfig
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 ¶
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 (*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)
Click to show internal directories.
Click to hide internal directories.