cspccontroller

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStoredCSPIVersionInterface

func GetStoredCSPIVersionInterface(cspiInformerFactory informers.SharedInformerFactory) v1interface.Interface

func GetVersionedCSPCInterface

func GetVersionedCSPCInterface(cspcInformerFactory informers.SharedInformerFactory) v1interface.Interface

func IsPoolMangerAvailable

func IsPoolMangerAvailable(pm appsv1.Deployment) bool

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller is the controller implementation for CSPC resources

func (*Controller) EstimateCSPCVersion

func (c *Controller) EstimateCSPCVersion(cspc *cstor.CStorPoolCluster) (string, error)

EstimateCSPCVersion returns the cspi version if any cspi is present for the cspc or returns the maya version as the new cspi created will be of maya version

func (*Controller) GetCSPIListForCSPC

func (c *Controller) GetCSPIListForCSPC(cspc *cstor.CStorPoolCluster) (*cstor.CStorPoolInstanceList, error)

GetCSPIListForCSPC returns list of cspi parented by cspc.

func (*Controller) GetCSPIWithoutDeployment

func (c *Controller) GetCSPIWithoutDeployment(cspc *cstor.CStorPoolCluster) ([]cstor.CStorPoolInstance, error)

GetCSPIWithoutDeployment gets the CSPIs for whom the pool deployment does not exists.

func (*Controller) GetStoredCStorVersionClient

func (c *Controller) GetStoredCStorVersionClient() cstorstoredversion.CstorV1Interface

func (*Controller) GetStoredOpenebsVersionClient

func (c *Controller) GetStoredOpenebsVersionClient() openebsstoredversion.OpenebsV1alpha1Interface

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

func (*Controller) ShouldReconcile

func (c *Controller) ShouldReconcile(cspc cstor.CStorPoolCluster) (bool, string)

func (*Controller) UpdateStatus

func (c *Controller) UpdateStatus(cspc *cstor.CStorPoolCluster) error

func (*Controller) UpdateStatusEventually

func (c *Controller) UpdateStatusEventually(cspc *cstor.CStorPoolCluster) error

type ControllerBuilder

type ControllerBuilder struct {
	Controller *Controller
}

ControllerBuilder is the builder object for controller.

func NewControllerBuilder

func NewControllerBuilder() *ControllerBuilder

NewControllerBuilder returns an empty instance of controller builder.

func (*ControllerBuilder) Build

func (cb *ControllerBuilder) Build() (*Controller, error)

Build returns a controller instance.

func (*ControllerBuilder) WithCSPCLister

withSpcLister fills cspc lister to controller object.

func (*ControllerBuilder) WithCSPCSynced

withcspcSynced adds object sync information in cache to controller object.

func (*ControllerBuilder) WithCSPILister

WithCSPILister fills cspi lister to controller object.

func (*ControllerBuilder) WithCSPISynced

WithCSPISynced adds object sync information in cache to controller object.

func (*ControllerBuilder) WithEventHandler

func (cb *ControllerBuilder) WithEventHandler(InformerFactory informers.SharedInformerFactory) *ControllerBuilder

withEventHandler adds event handlers controller object.

func (*ControllerBuilder) WithKubeClient

func (cb *ControllerBuilder) WithKubeClient(ks kubernetes.Interface) *ControllerBuilder

withKubeClient fills kube client to controller object.

func (*ControllerBuilder) WithOpenEBSClient

func (cb *ControllerBuilder) WithOpenEBSClient(cs clientset.Interface) *ControllerBuilder

withOpenEBSClient fills openebs client to controller object.

func (*ControllerBuilder) WithRecorder

withRecorder adds recorder to controller object.

func (*ControllerBuilder) WithWorkqueueRateLimiting

func (cb *ControllerBuilder) WithWorkqueueRateLimiting() *ControllerBuilder

withWorkqueue adds workqueue to controller object.

type PoolConfig

type PoolConfig struct {
	AlgorithmConfig *algorithm.Config
	Controller      *Controller
}

PoolConfig embeds alogrithm config from algorithm package and Controller object.

func NewPoolConfig

func NewPoolConfig() *PoolConfig

NewPoolConfig returns an empty instance of poolconfig object.

func (*PoolConfig) ClaimBD

func (pc *PoolConfig) ClaimBD(bdName string) error

ClaimBD calims a block device

func (*PoolConfig) ClaimBDList

func (pc *PoolConfig) ClaimBDList(bdList []string)

ClaimBDList claims a list of block device

func (*PoolConfig) CreateCSPI

func (pc *PoolConfig) CreateCSPI(cspc *cstor.CStorPoolCluster) error

CreateCSPI creates CSPI

func (*PoolConfig) CreateCSPIDeployment

func (pc *PoolConfig) CreateCSPIDeployment(cspc *cstor.CStorPoolCluster, cspi *cstor.CStorPoolInstance) error

CreateStoragePool creates the required resource to provision a cStor pool

func (*PoolConfig) ScaleDown

func (pc *PoolConfig) ScaleDown(cspc *cstor.CStorPoolCluster)

DownScalePool deletes the required pool.

func (*PoolConfig) ScaleUp

func (pc *PoolConfig) ScaleUp(cspc *cstor.CStorPoolCluster, pendingPoolCount int)

ScaleUp creates as many cstor pool on a node as pendingPoolCount.

func (*PoolConfig) WithAlgorithmConfig

func (pc *PoolConfig) WithAlgorithmConfig(ac *algorithm.Config) *PoolConfig

WithAlgorithmConfig sets the AlgorithmConfig field of the poolconfig object.

func (*PoolConfig) WithController

func (pc *PoolConfig) WithController(c *Controller) *PoolConfig

WithController sets the controller field of the poolconfig object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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