Version: v0.13.0-rc.1 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 83 Imported by: 1




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/"
View Source
const (
	CustomConfigMountPath         = "/elasticsearch/custom-config"
	ExporterCertDir               = "/usr/config/certs"
	ConfigMergerInitContainerName = "config-merger"


View Source
var (
	NodeRoleMaster = "node.role.master"
	NodeRoleClient = "node.role.client"
	NodeRoleData   = ""


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


type Controller

type Controller struct {
	// 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 (c *Controller) GetSnapshotter(snapshot *api.Snapshot) (*batch.Job, error)

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 {

	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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL