Documentation ¶
Index ¶
- Constants
- type ActionType
- type CacheConfig
- type LocalVolumeProvisioner
- func (p *LocalVolumeProvisioner) Delete(ctx context.Context, pv *corev1.PersistentVolume) error
- func (p *LocalVolumeProvisioner) Provision(ctx context.Context, opts pvController.ProvisionOptions) (*corev1.PersistentVolume, pvController.ProvisioningState, error)
- func (p *LocalVolumeProvisioner) SetImagePullSecret(secret string)
- type Populator
- type VolumeCache
- func (cache *VolumeCache) AddPV(pv *corev1.PersistentVolume)
- func (cache *VolumeCache) DeletePV(pvName string)
- func (cache *VolumeCache) GetPV(pvName string) (*corev1.PersistentVolume, bool)
- func (cache *VolumeCache) ListPVs() []*corev1.PersistentVolume
- func (cache *VolumeCache) UpdatePV(pv *corev1.PersistentVolume)
- type VolumeOptions
Constants ¶
View Source
const ( // AnnProvisionedBy is the external provisioner annotation in PV object AnnProvisionedBy = "pv.kubernetes.io/provisioned-by" // DefaultMountPoint is the mount point of raid device on the host under in knode DefaultMountPoint = "/mnt/disks/raid0" // DefaultFsType is the filesystem type to mount DefaultFsType = "ext4" // LocalFilesystemEnv will contain the filesystm path when script is invoked LocalFilesystemEnv = "LOCAL_PV_FILESYSTEM" )
View Source
const ( ActionTypeCreate = "create" ActionTypeDelete = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
type CacheConfig ¶
type CacheConfig struct { // Unique name of this provisioner ProvisionerName string // Cache to store PVs managed by this provisioner Cache *VolumeCache // InformerFactory gives access to informers for the controller. InformerFactory informers.SharedInformerFactory }
type LocalVolumeProvisioner ¶
type LocalVolumeProvisioner struct { *CacheConfig // contains filtered or unexported fields }
func NewProvisioner ¶
func (*LocalVolumeProvisioner) Delete ¶
func (p *LocalVolumeProvisioner) Delete(ctx context.Context, pv *corev1.PersistentVolume) error
func (*LocalVolumeProvisioner) Provision ¶
func (p *LocalVolumeProvisioner) Provision(ctx context.Context, opts pvController.ProvisionOptions) (*corev1.PersistentVolume, pvController.ProvisioningState, error)
func (*LocalVolumeProvisioner) SetImagePullSecret ¶
func (p *LocalVolumeProvisioner) SetImagePullSecret(secret string)
type Populator ¶
type Populator struct {
*CacheConfig
}
The Populator uses an Informer to populate the VolumeCache.
func NewPopulator ¶
func NewPopulator(config *CacheConfig) *Populator
NewPopulator returns a Populator object to update the PV cache
type VolumeCache ¶
type VolumeCache struct {
// contains filtered or unexported fields
}
VolumeCache keeps all the PersistentVolumes that have been created by this provisioner. It is periodically updated by the Populator. The Deleter and Discoverer use the VolumeCache to check on created PVs
func NewVolumeCache ¶
func NewVolumeCache() *VolumeCache
NewVolumeCache creates a new PV cache object for storing PVs created by this provisioner.
func (*VolumeCache) AddPV ¶
func (cache *VolumeCache) AddPV(pv *corev1.PersistentVolume)
AddPV adds the PV object to the cache
func (*VolumeCache) DeletePV ¶
func (cache *VolumeCache) DeletePV(pvName string)
DeletePV deletes the PV object from the cache
func (*VolumeCache) GetPV ¶
func (cache *VolumeCache) GetPV(pvName string) (*corev1.PersistentVolume, bool)
GetPV returns the PV object given the PV name
func (*VolumeCache) ListPVs ¶
func (cache *VolumeCache) ListPVs() []*corev1.PersistentVolume
ListPVs returns a list of all the PVs in the cache
func (*VolumeCache) UpdatePV ¶
func (cache *VolumeCache) UpdatePV(pv *corev1.PersistentVolume)
UpdatePV updates the PV object in the cache
type VolumeOptions ¶
Click to show internal directories.
Click to hide internal directories.