Documentation ¶
Index ¶
- Constants
- Variables
- func NewSignedCert(cfg cert.Config, key *rsa.PrivateKey, caCert *x509.Certificate, ...) (*x509.Certificate, error)
- 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 ( ConfigFileName = "elasticsearch.yml" ConfigFileMountPathSG = "/elasticsearch/config" ConfigFileMountPath = "/usr/share/elasticsearch/config" TempConfigFileMountPath = "/elasticsearch/temp-config" DatabaseConfigMapSuffix = `config` )
View Source
const ( AdminUser = "admin" ElasticUser = "elastic" KeyAdminUserName = "ADMIN_USERNAME" KeyAdminPassword = "ADMIN_PASSWORD" ReadAllUser = "readall" KeyReadAllUserName = "READALL_USERNAME" KeyReadAllPassword = "READALL_PASSWORD" ExporterSecretPath = "/var/run/secrets/kubedb.com/" )
View Source
const ( CustomConfigMountPath = "/elasticsearch/custom-config" ExporterCertDir = "/usr/config/certs" ConfigMergerInitContainerName = "config-merger" )
Variables ¶
View Source
var ( NodeRoleMaster = "node.role.master" NodeRoleClient = "node.role.client" NodeRoleData = "node.role.data" )
Functions ¶
func NewSignedCert ¶
func NewSignedCert(cfg cert.Config, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, error)
NewSignedCert creates a signed certificate using the given CA certificate and key
Types ¶
type Controller ¶
type Controller struct { amc.Config *amc.Controller // contains filtered or unexported fields }
func New ¶
func New( restConfig *restclient.Config, client kubernetes.Interface, apiExtKubeClient crd_cs.ApiextensionsV1beta1Interface, extClient cs.Interface, stashClient scs.Interface, dc dynamic.Interface, appCatalogClient appcat_cs.Interface, 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 Resources 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 Elasticsearch, 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 DynamicClient dynamic.Interface StashClient scs.Interface AppCatalogClient appcat_cs.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.