Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProvisionController ¶
type ProvisionController struct {
// contains filtered or unexported fields
}
Controller is a controller that watch PersistentVolumeClaim adn provisions PersistentVolumes.
func NewProvisioningController ¶
func NewProvisioningController(p Provisioner) (*ProvisionController, error)
NewProvisionController creates a new provision controller with the given Provisioner.
func (*ProvisionController) Start ¶
func (c *ProvisionController) Start() error
Start starts all the controller loop.
The contorller will gracefully stop upon receiving SIGTERM or SIGINT.
type ProvisionOptions ¶
type ProvisionOptions struct { // VolumeName is the name of the appropriate PersistentVolume. It can be used // to generate the volume name on the underlying storage provider. VolumeName string // PersistentVolumeClaim is a reference to the claim that lead to // provisioning of a new PersistentVolume. Provisioners *must* create a PV // that would be matched by this PersistentVolumeClaim (i.e. with required // capacity, accessMode, labels matching PersistentVolumeClaim.Spec.Selector // and so on). PersistentVolumeClaim *v1.PersistentVolumeClaim // StorageClass is a reference to the storage class that is used for // provisioning for this volume StorageClass *storagev1.StorageClass }
ProvisionOptions is passed to Provisioner.Provision and contains all the necessary information required to provision a volume.
type Provisioner ¶
type Provisioner interface { Name() string Provision(ProvisionOptions) (*v1.PersistentVolume, error) Delete(*v1.PersistentVolume) error }
Provisioner is an interface that creates templates for PersistentVolumes and can create the volume as a new resource in the infrastructure provider. It can also remove the volume it created from the underlying storage provider.
Click to show internal directories.
Click to hide internal directories.