storage

package
v0.0.0-...-1562095 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StorageProvisionerAnnotationNamespace is the domain used in
	// all the annotation & label keys in this repo
	StorageProvisionerAnnotationNamespace string = "storageprovisioner.dao.mayadata.io"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// Name of this controller
	Name string

	// Various informer factories required by this controller
	InformerFactory    informers.SharedInformerFactory
	DDPInformerFactory ddpinformers.SharedInformerFactory

	// core reconciliation logic
	StorageReconcilerFn func(*ddp.Storage) error
	PVCReconcilerFn     func(*v1.PersistentVolumeClaim) error

	// Queues to queue reconcile keys before invoking reconciliation
	StorageQueue workqueue.RateLimitingInterface
	PVCQueue     workqueue.RateLimitingInterface
	// contains filtered or unexported fields
}

Controller to add / remove storage

func (*Controller) Init

func (ctrl *Controller) Init() error

Init initializes the storage controller with required properties

NOTE:

Init must be invoked by caller before invoking any other

methods of this instance

func (*Controller) Run

func (ctrl *Controller) Run(workers int, stopCh <-chan struct{})

Run starts provisioner and listens on channel events

func (*Controller) String

func (ctrl *Controller) String() string

String implements Stringer interface

type PVCReconciler

type PVCReconciler struct {
	// instances to invoke various Kubernetes APIs
	Clientset kubernetes.Interface
	VALister  storagelisters.VolumeAttachmentLister
	// contains filtered or unexported fields
}

PVCReconciler manages reconciling PVC API in kubernetes cluster

func (*PVCReconciler) Reconcile

func (r *PVCReconciler) Reconcile(pvc *v1.PersistentVolumeClaim) error

Reconcile accepts PVC as the desired state and starts executing the reconcile logic based on this desired state

NOTE:

Reconcile logic needs to be idempotent

func (*PVCReconciler) String

func (r *PVCReconciler) String() string

String implements stringer interface

type Reconciler

type Reconciler struct {
	// instances to invoke various Kubernetes APIs
	Clientset kubernetes.Interface
	PVCLister corelisters.PersistentVolumeClaimLister
	// contains filtered or unexported fields
}

Reconciler manages reconciling storage API in kubernetes cluster

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(stor *ddp.Storage) error

Reconcile accepts storage as the desired state and starts executing the reconcile logic based on this desired state

NOTE:

Reconcile logic needs to be idempotent

func (*Reconciler) String

func (r *Reconciler) String() string

Jump to

Keyboard shortcuts

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