Documentation ¶
Index ¶
- Constants
- func FoundStashCRDs(apiExtClient crd_cs.ApiextensionsV1beta1Interface) bool
- type Config
- type Controller
- func (c *Controller) BlockOnStashOperator(stopCh <-chan struct{}) error
- func (c *Controller) CreateDeploymentPodDisruptionBudget(deployment *appsv1.Deployment) error
- func (c *Controller) CreateGoverningService(name, namespace string) error
- func (c *Controller) CreateStatefulSetPodDisruptionBudget(sts *appsv1.StatefulSet) error
- func (c *Controller) DeleteSnapshotData(snapshot *api.Snapshot) error
- func (c *Controller) GetVolumeForSnapshot(st api.StorageType, pvcSpec *core.PersistentVolumeClaimSpec, ...) (*core.Volume, error)
- func (c *Controller) SetJobOwnerReference(snapshot *api.Snapshot, job *batch.Job) error
- type Deleter
- type Snapshotter
Constants ¶
View Source
const UtilVolumeName = "util-volume"
Variables ¶
This section is empty.
Functions ¶
func FoundStashCRDs ¶
func FoundStashCRDs(apiExtClient crd_cs.ApiextensionsV1beta1Interface) bool
Types ¶
type Config ¶
type Config struct { // Informer factory KubeInformerFactory informers.SharedInformerFactory KubedbInformerFactory kubedbinformers.SharedInformerFactory StashInformerFactory stashInformers.SharedInformerFactory // DormantDb queue DrmnQueue *queue.Worker DrmnInformer cache.SharedIndexInformer // job queue JobQueue *queue.Worker JobInformer cache.SharedIndexInformer // snapshot queue SnapQueue *queue.Worker SnapInformer cache.SharedIndexInformer // restoreSession queue RSQueue *queue.Worker RSInformer cache.SharedIndexInformer EnableRBAC bool OperatorNamespace string GoverningService string ResyncPeriod time.Duration MaxNumRequeues int NumThreads int LoggerOptions golog.Options EnableAnalytics bool AnalyticsClientID string WatchNamespace string EnableValidatingWebhook bool EnableMutatingWebhook bool }
type Controller ¶
type Controller struct { ClientConfig *rest.Config // Kubernetes client Client kubernetes.Interface // Api Extension Client ApiExtKubeClient crd_cs.ApiextensionsV1beta1Interface // ThirdPartyExtension client ExtClient cs.Interface //#TODO: rename to DBClient // Dynamic client DynamicClient dynamic.Interface // AppCatalog client AppCatalogClient appcat_cs.AppcatalogV1alpha1Interface // StashClient for stash StashClient scs.Interface }
func (*Controller) BlockOnStashOperator ¶
func (c *Controller) BlockOnStashOperator(stopCh <-chan struct{}) error
BlockOnStashOperator waits for restoresession crd to come up. It either waits until restoresession crd exists or throws error otherwise
func (*Controller) CreateDeploymentPodDisruptionBudget ¶
func (c *Controller) CreateDeploymentPodDisruptionBudget(deployment *appsv1.Deployment) error
func (*Controller) CreateGoverningService ¶
func (c *Controller) CreateGoverningService(name, namespace string) error
func (*Controller) CreateStatefulSetPodDisruptionBudget ¶
func (c *Controller) CreateStatefulSetPodDisruptionBudget(sts *appsv1.StatefulSet) error
func (*Controller) DeleteSnapshotData ¶
func (c *Controller) DeleteSnapshotData(snapshot *api.Snapshot) error
func (*Controller) GetVolumeForSnapshot ¶
func (c *Controller) GetVolumeForSnapshot(st api.StorageType, pvcSpec *core.PersistentVolumeClaimSpec, jobName, namespace string) (*core.Volume, error)
GetVolumeForSnapshot returns pvc or empty directory depending on StorageType. In case of PVC, this function will create a PVC then returns the volume.
func (*Controller) SetJobOwnerReference ¶
type Deleter ¶
type Deleter interface { // WaitUntilPaused will block until db pods and service are deleted. PV/PVC will remain intact. WaitUntilPaused(*api.DormantDatabase) error // WipeOutDatabase won't need to handle snapshots and PVCs. // All other elements of database will be Wipedout on WipeOutDatabase function. // Ex: secrets, wal-g data and other staff that is required. WipeOutDatabase(*api.DormantDatabase) error }
type Snapshotter ¶
type Snapshotter interface { ValidateSnapshot(*api.Snapshot) error GetDatabase(metav1.ObjectMeta) (runtime.Object, error) GetSnapshotter(*api.Snapshot) (*batch.Job, error) WipeOutSnapshot(*api.Snapshot) error SetDatabaseStatus(metav1.ObjectMeta, api.DatabasePhase, string) error UpsertDatabaseAnnotation(metav1.ObjectMeta, map[string]string) error }
Click to show internal directories.
Click to hide internal directories.