Documentation ¶
Index ¶
- Constants
- Variables
- func BaseLabels(cvc *apis.CStorVolumeClaim) map[string]string
- func MergeResizeConditionsOfCVC(oldConditions, resizeConditions []apis.CStorVolumeClaimCondition) []apis.CStorVolumeClaimCondition
- func Start(controllerMtx *sync.RWMutex) error
- type CVCController
- type CVCControllerBuilder
- type Patch
Constants ¶
const ( // SuccessSynced is used as part of the Event 'reason' when a // cstorvolumeclaim is synced SuccessSynced = "Synced" // ErrResourceExists is used as part of the Event 'reason' when a // cstorvolumeclaim fails to sync due to a cstorvolumeclaim of the same // name already existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a resource // fails to sync due to a cstorvolumeclaim already existing MessageResourceExists = "Resource %q already exists and is not managed by CVC" // MessageResourceSynced is the message used for an Event fired when a // cstorvolumeclaim is synced successfully MessageResourceSynced = "cstorvolumeclaim synced successfully" // MessageResourceCreated msg used for cstor volume provisioning success event MessageResourceCreated = "cstorvolumeclaim created successfully" // CStorVolumeClaimFinalizer name of finalizer on CStorVolumeClaim that // are bound by CStorVolume CStorVolumeClaimFinalizer = "cvc.openebs.io/finalizer" )
const ( // ReplicaCount represents replica count value ReplicaCount = "replicaCount" // CStorVolumeReplicaFinalizer is the name of finalizer on CStorVolumeClaim CStorVolumeReplicaFinalizer = "cstorvolumereplica.openebs.io/finalizer" )
Variables ¶
var ( // OpenEBSServiceAccount name of the openebs service accout with required // permissions OpenEBSServiceAccount = "openebs-maya-operator" // TargetContainerName is the name of cstor target container name TargetContainerName = "cstor-istgt" // MonitorContainerName is the name of monitor container name MonitorContainerName = "maya-volume-exporter" // MgmtContainerName is the container name of cstor volume mgmt side car MgmtContainerName = "cstor-volume-mgmt" )
Functions ¶
func BaseLabels ¶
func BaseLabels(cvc *apis.CStorVolumeClaim) map[string]string
BaseLabels returns the base labels we apply to cstorvolumereplicas created
func MergeResizeConditionsOfCVC ¶
func MergeResizeConditionsOfCVC(oldConditions, resizeConditions []apis.CStorVolumeClaimCondition) []apis.CStorVolumeClaimCondition
MergeResizeConditionsOfCVC updates cvc with desired resize conditions leaving other conditions untouched.
Types ¶
type CVCController ¶
type CVCController struct {
// contains filtered or unexported fields
}
CVCController is the controller implementation for CVC resources
func (*CVCController) IsCVRPending ¶
func (c *CVCController) IsCVRPending(cvc *apis.CStorVolumeClaim) (bool, error)
IsCVRPending look for pending cstorvolume replicas compared to desired replica count. returns true if count doesn't matches.
func (*CVCController) PatchCVCStatus ¶
func (c *CVCController) PatchCVCStatus(oldCVC, newCVC *apis.CStorVolumeClaim, ) (*apis.CStorVolumeClaim, error)
PatchCVCStatus updates CVC status using patch api
func (*CVCController) Run ¶
func (c *CVCController) 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.
type CVCControllerBuilder ¶
type CVCControllerBuilder struct {
CVCController *CVCController
}
CVCControllerBuilder is the builder object for controller.
func NewCVCControllerBuilder ¶
func NewCVCControllerBuilder() *CVCControllerBuilder
NewCVCControllerBuilder returns an empty instance of controller builder.
func (*CVCControllerBuilder) Build ¶
func (cb *CVCControllerBuilder) Build() (*CVCController, error)
Build returns a controller instance.