apimachinery: kubedb.dev/apimachinery/pkg/controller Index | Files | Directories

package controller

import "kubedb.dev/apimachinery/pkg/controller"

Index

Package Files

controller.go lib.go

Constants

const UtilVolumeName = "util-volume"

type Config Uses

type Config struct {
    // Informer factory
    KubeInformerFactory        informers.SharedInformerFactory
    KubedbInformerFactory      kubedbinformers.SharedInformerFactory
    StashInformerFactory       stashInformers.SharedInformerFactory
    AppCatInformerFactory      appcat_in.SharedInformerFactory
    ExternalInformerFactory    externalInformers.SharedInformerFactory
    CertManagerInformerFactory cmInformers.SharedInformerFactory

    // restoreSession queue
    RSQueue    *queue.Worker
    RSInformer cache.SharedIndexInformer

    // Secret
    SecretInformer cache.SharedIndexInformer
    SecretLister   corelisters.SecretLister

    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 Uses

type Controller struct {
    ClientConfig *rest.Config
    // Kubernetes client
    Client kubernetes.Interface
    // CRD Client
    CRDClient crd_cs.Interface
    // ThirdPartyExtension client
    ExtClient cs.Interface //#TODO: rename to DBClient
    // Dynamic client
    DynamicClient dynamic.Interface
    // AppCatalog client
    AppCatalogClient appcat_cs.Interface
    // StashClient for stash
    StashClient scs.Interface
    //CertManagerClient for cert-manger
    CertManagerClient cm.Interface
    // Cluster topology when the operator started
    ClusterTopology *core_util.Topology
}

func (*Controller) BlockOnStashOperator Uses

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 Uses

func (c *Controller) CreateDeploymentPodDisruptionBudget(deployment *appsv1.Deployment) error

func (*Controller) CreateGoverningService Uses

func (c *Controller) CreateGoverningService(name, namespace string) error

func (*Controller) CreateStatefulSetPodDisruptionBudget Uses

func (c *Controller) CreateStatefulSetPodDisruptionBudget(sts *appsv1.StatefulSet) error

func (*Controller) GetVolumeForSnapshot Uses

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.

type DBHelper Uses

type DBHelper interface {
    GetDatabase(metav1.ObjectMeta) (runtime.Object, error)
    SetDatabaseStatus(metav1.ObjectMeta, api.DatabasePhase, string) error
    UpsertDatabaseAnnotation(metav1.ObjectMeta, map[string]string) error
}

Directories

PathSynopsis
restoresession

Package controller imports 39 packages (graph) and is imported by 29 packages. Updated 2020-07-02. Refresh now. Tools for package owners.