cstorvolumeclaim

package
v0.0.0-...-a88c85e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (

	// ReplicaCount represents replica count value
	ReplicaCount = "replicaCount"
	// CStorVolumeReplicaFinalizer is the name of finalizer on CStorVolumeClaim
	CStorVolumeReplicaFinalizer = "cstorvolumereplica.openebs.io/finalizer"
)

Variables

View Source
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.

func Start

func Start(controllerMtx *sync.RWMutex) error

Start starts the cstor-operator.

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.

type Patch

type Patch struct {
	Op    string `json:"op"`
	Path  string `json:"path"`
	Value string `json:"value"`
}

Patch struct represent the struct used to patch the cstorvolumeclaim object

Jump to

Keyboard shortcuts

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