mongodb: kubedb.dev/mongodb/pkg/controller Index | Files

package controller

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

Index

Package Files

appbinding.go certificate.go config.go configsource.go controller.go dormant.go mongodb.go mongos.go monitor.go rbac.go replicaset.go secret.go service.go statefulset.go util.go workqueue.go

Constants

const (
    KeyMongoDBUser     = "username"
    KeyMongoDBPassword = "password"
    KeyForKeyFile      = "key.txt"

    DatabaseSecretSuffix = "-auth"
)
const (
    InitScriptDirectoryName = "init-scripts"
    InitScriptDirectoryPath = "/init-scripts"
    TempScriptDirectoryPath = "/scripts"

    InitInstallContainerName   = "copy-config"
    InitBootstrapContainerName = "bootstrap"
)
const (
    MongoDBPort = 27017
)

type Controller Uses

type Controller struct {
    amc.Config
    *amc.Controller
    // contains filtered or unexported fields
}

func New Uses

func New(
    clientConfig *rest.Config,
    client kubernetes.Interface,
    crdClient crd_cs.Interface,
    extClient cs.Interface,
    stashClient scs.Interface,
    dc dynamic.Interface,
    appCatalogClient appcat_cs.Interface,
    promClient pcm.MonitoringV1Interface,
    opt amc.Config,
    topology *core_util.Topology,
    recorder record.EventRecorder,
) *Controller

func (*Controller) EnsureCustomResourceDefinitions Uses

func (c *Controller) EnsureCustomResourceDefinitions() error

EnsureCustomResourceDefinitions ensures CRD for MongoDB, DormantDatabase and Snapshot

func (*Controller) GetDatabase Uses

func (c *Controller) GetDatabase(meta metav1.ObjectMeta) (runtime.Object, error)

func (*Controller) Init Uses

func (c *Controller) Init() error

InitInformer initializes MongoDB, DormantDB amd Snapshot watcher

func (*Controller) MongoDBForSecret Uses

func (c *Controller) MongoDBForSecret(s *core.Secret) (*api.MongoDB, error)

func (*Controller) Run Uses

func (c *Controller) Run(stopCh <-chan struct{})

Blocks caller. Intended to be called as a Go routine.

func (*Controller) RunControllers Uses

func (c *Controller) RunControllers(stopCh <-chan struct{})

RunControllers runs queue.worker

func (*Controller) SetDatabaseStatus Uses

func (c *Controller) SetDatabaseStatus(meta metav1.ObjectMeta, phase api.DatabasePhase, reason string) error

func (*Controller) StartAndRunControllers Uses

func (c *Controller) StartAndRunControllers(stopCh <-chan struct{})

StartAndRunControllers starts InformetFactory and runs queue.worker

func (*Controller) UpsertDatabaseAnnotation Uses

func (c *Controller) UpsertDatabaseAnnotation(meta metav1.ObjectMeta, annotation map[string]string) error

type OperatorConfig Uses

type OperatorConfig struct {
    amc.Config

    ClientConfig     *rest.Config
    KubeClient       kubernetes.Interface
    CRDClient        crd_cs.Interface
    DBClient         cs.Interface
    DynamicClient    dynamic.Interface
    StashClient      scs.Interface
    AppCatalogClient appcat_cs.Interface
    PromClient       pcm.MonitoringV1Interface
}

func NewOperatorConfig Uses

func NewOperatorConfig(clientConfig *rest.Config) *OperatorConfig

func (*OperatorConfig) New Uses

func (c *OperatorConfig) New() (*Controller, error)

Package controller imports 61 packages (graph) and is imported by 8 packages. Updated 2020-07-09. Refresh now. Tools for package owners.