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 PanicKubeVersionError
- type Plugin
- 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" AnnReclaimPolicy = AnnPrefix + "/reclaimPolicy" 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" )
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 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) GetPVForPVC ¶
func (p *Plugin) GetPVForPVC(claim *v1.PersistentVolumeClaim) (*v1.PersistentVolume, error)
GetPVForPVC returns the PV for a bound PVC.
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.