solr

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ControllerName is an identifier for the controller.
	ControllerName = "solr-controller"

	// Prefix applied to Kubernetes resources.
	Prefix = "solr"

	// EnvSolrHeap is the name of the env var used to define the heap size.
	EnvSolrHeap = "SOLR_HEAP"
	// EnvSolrJavaMem required to tune Solr resource consumption.
	EnvSolrJavaMem = "SOLR_JAVA_MEM"
	// EnvJVMOpts required to tune Solr resource cosumption.
	EnvJVMOpts = "JVM_OPTS"

	// EnvSolrCore is the name of the env var used to define the core name.
	EnvSolrCore = "SOLR_CORE"

	// MountName is used when connecting a PersistentVolumeClaim to a VolumeMount.
	MountName = "data"

	// LabelAppName for discovery.
	LabelAppName = "app_name"
	// LabelAppType for discovery.
	LabelAppType = "app_type"
	// LabelAppLayer for discovery.
	LabelAppLayer = "app_layer"

	// ContainerInit used for identifying the initialisation container.
	ContainerInit = "init"
	// ContainerSolr used for identifying the long running Solr container.
	ContainerSolr = "solr"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, params ReconcileParams) error

Add creates a new Solr Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type ReconcileParams

type ReconcileParams struct {
	// Init container used to initialize a Solr core.
	Init ReconcileParamsInit
	// Image used to run Solr, tags are provided by the CustomResourceDefinition.
	Image string
	// Port which Solr will respond to requests.
	Port int
	// StorageClass used to provision storage.
	StorageClass string
	// Path which storage will be mounted.
	StorageMount string
}

ReconcileParams contains parameters to pass to reconcile loop.

type ReconcileParamsInit added in v0.4.1

type ReconcileParamsInit struct {
	// Image used to enforce permissions.
	Image string
	// Tag for the image used to enforce permissions.
	Tag string
	// User to enforce for a data directory.
	User string
}

ReconcileParamsInit for initializing a Solr core.

type ReconcileSolr

type ReconcileSolr struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileSolr reconciles a Solr object

func (*ReconcileSolr) Reconcile

func (r *ReconcileSolr) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Solr object and makes changes based on the state read and what is in the Solr.Spec Automatically generate RBAC rules to allow the Controller to read and write statefulesets +kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=apps,resources=statefulsets/status,verbs=get;update;patch +kubebuilder:rbac:groups=apps,resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=apps,resources=services/status,verbs=get;update;patch +kubebuilder:rbac:groups=search.skpr.io,resources=solrs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=search.skpr.io,resources=solrs/status,verbs=get;update;patch

func (*ReconcileSolr) Sync added in v0.4.1

Sync resources required to run Solr.

func (*ReconcileSolr) SyncStatus added in v0.4.1

func (r *ReconcileSolr) SyncStatus(log promlog.Logger, solr *searchv1beta1.Solr, status searchv1beta1.SolrStatus) error

SyncStatus of the resources which have been provisioned.

Jump to

Keyboard shortcuts

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