Documentation ¶
Index ¶
- Constants
- func CreateISCSIPersistentVolumeSource(k8sClient k8sclient.Interface, kubeVersion *k8sutilversion.Version, ...) (*v1.ISCSIPersistentVolumeSource, error)
- func CreateNFSVolumeSource(vol *storage.VolumeExternal) *v1.NFSVolumeSource
- func GetPersistentVolumeClaimClass(claim *v1.PersistentVolumeClaim) string
- func IsPanicKubeVersion(err error) bool
- func IsUnsupportedKubeVersion(err error) bool
- func PatchPV(kubeClient kubernetes.Interface, pv *v1.PersistentVolume, ...) (*v1.PersistentVolume, error)
- func PatchPVC(kubeClient kubernetes.Interface, pvc *v1.PersistentVolumeClaim, ...) (*v1.PersistentVolumeClaim, error)
- func PatchPVCStatus(kubeClient kubernetes.Interface, pvc *v1.PersistentVolumeClaim, ...) (*v1.PersistentVolumeClaim, error)
- func ValidateKubeVersion(versionInfo *k8sversion.Info) (kubeVersion *k8sutilversion.Version, err error)
- type KubernetesPlugin
- type PanicKubeVersionError
- type Plugin
- func (p *Plugin) Activate() error
- func (p *Plugin) Deactivate() error
- func (p *Plugin) GetName() string
- func (p *Plugin) GetPVCForPV(pv *v1.PersistentVolume) (*v1.PersistentVolumeClaim, error)
- func (p *Plugin) GetPVForPVC(claim *v1.PersistentVolumeClaim) (*v1.PersistentVolume, error)
- func (p *Plugin) ImportVolume(request *storage.ImportVolumeRequest) (*storage.VolumeExternal, error)
- func (p *Plugin) Version() string
- type StorageClassSummary
- type UnsupportedKubeVersionError
Constants ¶
View Source
const ( KubernetesSyncPeriod = 60 * time.Second KubernetesResizeSyncPeriod = 3 * time.Minute // Kubernetes-defined storage class parameters K8sFsType = "fsType" // Kubernetes-defined annotations // (Based on kubernetes/pkg/controller/volume/persistentvolume/controller.go) AnnClass = "volume.beta.kubernetes.io/storage-class" AnnDynamicallyProvisioned = "pv.kubernetes.io/provisioned-by" AnnStorageProvisioner = "volume.beta.kubernetes.io/storage-provisioner" AnnDefaultStorageClass = "storageclass.kubernetes.io/is-default-class" AnnMountOptions = "volume.beta.kubernetes.io/mount-options" // Orchestrator-defined annotations AnnOrchestrator = "netapp.io/" + config.OrchestratorName AnnPrefix = config.OrchestratorName + ".netapp.io" AnnProtocol = AnnPrefix + "/protocol" AnnSpaceReserve = AnnPrefix + "/spaceReserve" AnnSnapshotPolicy = AnnPrefix + "/snapshotPolicy" AnnSnapshotReserve = AnnPrefix + "/snapshotReserve" AnnSnapshotDir = AnnPrefix + "/snapshotDirectory" AnnUnixPermissions = AnnPrefix + "/unixPermissions" AnnVendor = AnnPrefix + "/vendor" AnnBackendID = AnnPrefix + "/backendID" AnnExportPolicy = AnnPrefix + "/exportPolicy" AnnBlockSize = AnnPrefix + "/blockSize" AnnFileSystem = AnnPrefix + "/fileSystem" AnnCloneFromPVC = AnnPrefix + "/cloneFromPVC" AnnSplitOnClone = AnnPrefix + "/splitOnClone" AnnNotManaged = AnnPrefix + "/notManaged" )
Variables ¶
This section is empty.
Functions ¶
func CreateISCSIPersistentVolumeSource ¶
func CreateISCSIPersistentVolumeSource( k8sClient k8sclient.Interface, kubeVersion *k8sutilversion.Version, vol *storage.VolumeExternal, ) (*v1.ISCSIPersistentVolumeSource, error)
func CreateNFSVolumeSource ¶
func CreateNFSVolumeSource(vol *storage.VolumeExternal) *v1.NFSVolumeSource
func GetPersistentVolumeClaimClass ¶
func GetPersistentVolumeClaimClass(claim *v1.PersistentVolumeClaim) string
GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was requested, it returns "".
func IsPanicKubeVersion ¶
func PatchPV ¶
func PatchPV(kubeClient kubernetes.Interface, pv *v1.PersistentVolume, pvUpdated *v1.PersistentVolume) (*v1.PersistentVolume, error)
PatchPV patches a PV after an update
func PatchPVC ¶
func PatchPVC(kubeClient kubernetes.Interface, pvc *v1.PersistentVolumeClaim, pvcUpdated *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
PatchPVC patches a PVC spec after an update
func PatchPVCStatus ¶
func PatchPVCStatus(kubeClient kubernetes.Interface, pvc *v1.PersistentVolumeClaim, pvcUpdated *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
PatchPVCStatus patches a PVC status after an update
func ValidateKubeVersion ¶
func ValidateKubeVersion(versionInfo *k8sversion.Info) (kubeVersion *k8sutilversion.Version, err error)
Types ¶
type KubernetesPlugin ¶
type KubernetesPlugin interface { frontend.Plugin ImportVolume(request *storage.ImportVolumeRequest) (*storage.VolumeExternal, error) }
type PanicKubeVersionError ¶
type PanicKubeVersionError struct {
Message string
}
func NewPanicKubeVersionError ¶
func NewPanicKubeVersionError(msg string) *PanicKubeVersionError
func (*PanicKubeVersionError) Error ¶
func (err *PanicKubeVersionError) Error() string
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
func NewPlugin(o core.Orchestrator, apiServerIP, kubeConfigPath string) (*Plugin, error)
func NewPluginInCluster ¶
func NewPluginInCluster(o core.Orchestrator) (*Plugin, error)
func (*Plugin) Deactivate ¶
func (*Plugin) GetPVCForPV ¶
func (p *Plugin) GetPVCForPV(pv *v1.PersistentVolume) (*v1.PersistentVolumeClaim, error)
GetPVCForPV returns the PVC for a PV.
func (*Plugin) GetPVForPVC ¶
func (p *Plugin) GetPVForPVC(claim *v1.PersistentVolumeClaim) (*v1.PersistentVolume, error)
GetPVForPVC returns the PV for a bound PVC.
func (*Plugin) ImportVolume ¶
func (p *Plugin) ImportVolume(request *storage.ImportVolumeRequest) (*storage.VolumeExternal, error)
type StorageClassSummary ¶
type StorageClassSummary struct { Parameters map[string]string MountOptions []string PersistentVolumeReclaimPolicy *v1.PersistentVolumeReclaimPolicy AllowVolumeExpansion *bool }
StorageClassSummary captures relevant fields in the storage class that are needed during PV creation or PV resize.
type UnsupportedKubeVersionError ¶
type UnsupportedKubeVersionError struct {
Message string
}
func NewUnsupportedKubeVersionError ¶
func NewUnsupportedKubeVersionError(msg string) *UnsupportedKubeVersionError
func (*UnsupportedKubeVersionError) Error ¶
func (err *UnsupportedKubeVersionError) Error() string
Click to show internal directories.
Click to hide internal directories.