Version: v1.12.1 Latest Latest

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

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




View Source
const (
	// PoolPrefix is prefix for pool name
	PoolPrefix string = "cstor-"
	// OpenEBSIOCSPIID is the environment variable specified in pod.
	// It holds the UID of the CSPI


This section is empty.


func ErrorWrapf

func ErrorWrapf(err error, format string, args ...interface{}) error

ErrorWrapf wrap error If given err is nil then it will return new error

func IsEmpty

func IsEmpty(s string) bool

IsEmpty check if string is empty or not

func IsReconcileDisabled

func IsReconcileDisabled(cspi *cstor.CStorPoolInstance) bool

IsReconcileDisabled check if reconciliation is disabled for given object or not

func IsRightCStorPoolInstanceMgmt

func IsRightCStorPoolInstanceMgmt(cspi *cstor.CStorPoolInstance) bool

IsRightCStorPoolInstanceMgmt is to check if the pool request is for this pod.

func IsStatusChange

func IsStatusChange(oldStatus, newStatus cstor.CStorPoolInstanceStatus) bool

IsStatusChange is to check only status change of cStorPoolInstance object.


type CStorPoolInstanceController

type CStorPoolInstanceController struct {
	// contains filtered or unexported fields

CStorPoolInstanceController is the controller implementation for CStorPoolInstance resources.

func NewCStorPoolInstanceController

func NewCStorPoolInstanceController(
	kubeclientset kubernetes.Interface,
	clientset clientset.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	cStorInformerFactory informers.SharedInformerFactory) *CStorPoolInstanceController

NewCStorPoolInstanceController returns a new instance of CStorPoolInstance controller

func (*CStorPoolInstanceController) Run

func (c *CStorPoolInstanceController) 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 (*CStorPoolInstanceController) UpdateStatusCondition

func (*CStorPoolInstanceController) UpdateStatusConditionEventually

func (c *CStorPoolInstanceController) UpdateStatusConditionEventually(
	cspi *cstor.CStorPoolInstance,
	condition cstor.CStorPoolInstanceCondition) (*cstor.CStorPoolInstance, error)

UpdateStatusConditionEventually updates the CSPI in etcd with provided condition. Below function retries for three times to update the CSPI with provided conditions


Path Synopsis

Jump to

Keyboard shortcuts

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