Documentation ¶
Index ¶
- func GetStoredCSPIVersionInterface(cspiInformerFactory informers.SharedInformerFactory) v1interface.Interface
- func GetVersionedCSPCInterface(cspcInformerFactory informers.SharedInformerFactory) v1interface.Interface
- func IsPoolMangerAvailable(pm appsv1.Deployment) bool
- type Controller
- func (c *Controller) EstimateCSPCVersion(cspc *cstor.CStorPoolCluster) (string, error)
- func (c *Controller) GetCSPIListForCSPC(cspc *cstor.CStorPoolCluster) (*cstor.CStorPoolInstanceList, error)
- func (c *Controller) GetCSPIWithoutDeployment(cspc *cstor.CStorPoolCluster) ([]cstor.CStorPoolInstance, error)
- func (c *Controller) GetStoredCStorVersionClient() cstorstoredversion.CstorV1Interface
- func (c *Controller) GetStoredOpenebsVersionClient() openebsstoredversion.OpenebsV1alpha1Interface
- func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error
- func (c *Controller) ShouldReconcile(cspc cstor.CStorPoolCluster) (bool, string)
- func (c *Controller) UpdateStatus(cspc *cstor.CStorPoolCluster) error
- func (c *Controller) UpdateStatusEventually(cspc *cstor.CStorPoolCluster) error
- type ControllerBuilder
- func (cb *ControllerBuilder) Build() (*Controller, error)
- func (cb *ControllerBuilder) WithCSPCLister(sl informers.SharedInformerFactory) *ControllerBuilder
- func (cb *ControllerBuilder) WithCSPCSynced(sl informers.SharedInformerFactory) *ControllerBuilder
- func (cb *ControllerBuilder) WithCSPILister(sl informers.SharedInformerFactory) *ControllerBuilder
- func (cb *ControllerBuilder) WithCSPISynced(sl informers.SharedInformerFactory) *ControllerBuilder
- func (cb *ControllerBuilder) WithEventHandler(InformerFactory informers.SharedInformerFactory) *ControllerBuilder
- func (cb *ControllerBuilder) WithKubeClient(ks kubernetes.Interface) *ControllerBuilder
- func (cb *ControllerBuilder) WithOpenEBSClient(cs clientset.Interface) *ControllerBuilder
- func (cb *ControllerBuilder) WithRecorder(ks kubernetes.Interface) *ControllerBuilder
- func (cb *ControllerBuilder) WithWorkqueueRateLimiting() *ControllerBuilder
- type PoolConfig
- func (pc *PoolConfig) ClaimBD(bdName string) error
- func (pc *PoolConfig) ClaimBDList(bdList []string)
- func (pc *PoolConfig) CreateCSPI(cspc *cstor.CStorPoolCluster) error
- func (pc *PoolConfig) CreateCSPIDeployment(cspc *cstor.CStorPoolCluster, cspi *cstor.CStorPoolInstance) error
- func (pc *PoolConfig) ScaleDown(cspc *cstor.CStorPoolCluster)
- func (pc *PoolConfig) ScaleUp(cspc *cstor.CStorPoolCluster, pendingPoolCount int)
- func (pc *PoolConfig) WithAlgorithmConfig(ac *algorithm.Config) *PoolConfig
- func (pc *PoolConfig) WithController(c *Controller) *PoolConfig
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 ¶
func (cb *ControllerBuilder) WithCSPCLister(sl informers.SharedInformerFactory) *ControllerBuilder
withSpcLister fills cspc lister to controller object.
func (*ControllerBuilder) WithCSPCSynced ¶
func (cb *ControllerBuilder) WithCSPCSynced(sl informers.SharedInformerFactory) *ControllerBuilder
withcspcSynced adds object sync information in cache to controller object.
func (*ControllerBuilder) WithCSPILister ¶
func (cb *ControllerBuilder) WithCSPILister(sl informers.SharedInformerFactory) *ControllerBuilder
WithCSPILister fills cspi lister to controller object.
func (*ControllerBuilder) WithCSPISynced ¶
func (cb *ControllerBuilder) WithCSPISynced(sl informers.SharedInformerFactory) *ControllerBuilder
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 ¶
func (cb *ControllerBuilder) WithRecorder(ks kubernetes.Interface) *ControllerBuilder
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.