Documentation ¶
Index ¶
- func MetaUIDFunc(obj interface{}) ([]string, error)
- type Flavor
- func (flavor *Flavor) ConfigureAnnotations(name string, parameters map[string]string) (map[string]string, error)
- func (flavor *Flavor) CreateNFSVolume(pvName string, reqVolSize int64, parameters map[string]string, ...) (nfsVolume *csi.Volume, rollback bool, err error)
- func (flavor *Flavor) DeleteNFSVolume(volumeID string) error
- func (flavor *Flavor) DeletePod(podName string, namespace string, force bool) error
- func (flavor *Flavor) DeleteVolumeAttachment(va string, force bool) error
- func (flavor *Flavor) GetCredentialsFromSecret(name string, namespace string) (map[string]string, error)
- func (flavor *Flavor) GetCredentialsFromVolume(name string) (map[string]string, error)
- func (flavor *Flavor) GetEphemeralVolumeSecretFromPod(volumeHandle string, podName string, namespace string) (string, error)
- func (flavor *Flavor) GetGroupSnapshotNameFromSnapshotName(name string) (string, error)
- func (flavor *Flavor) GetNFSVolumeID(volumeID string) (string, error)
- func (flavor *Flavor) GetNodeByName(nodeName string) (*v1.Node, error)
- func (flavor *Flavor) GetNodeInfo(nodeID string) (*model.Node, error)
- func (flavor *Flavor) GetOrchestratorVersion() (*version.Info, error)
- func (flavor *Flavor) GetVolumePropertyOfPV(propertyName string, pvName string) (string, error)
- func (flavor *Flavor) HandleNFSNodePublish(req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (flavor *Flavor) IsNFSVolume(volumeID string) bool
- func (flavor *Flavor) IsPodExists(uid string) (bool, error)
- func (flavor *Flavor) ListVolumeAttachments() (*storage_v1.VolumeAttachmentList, error)
- func (flavor *Flavor) LoadNodeInfo(node *model.Node) (string, error)
- func (flavor *Flavor) MonitorPod(podLabelkey, podLabelvalue string) error
- func (flavor *Flavor) RollbackNFSResources(nfsResourceName string, nfsNamespace string) error
- func (flavor *Flavor) UnloadNodeInfo()
- type NFSSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetaUIDFunc ¶
MetaUIDFunc is an IndexFunc used to cache PVCs by their UID
Types ¶
type Flavor ¶
type Flavor struct {
// contains filtered or unexported fields
}
Flavor of the CSI driver
func NewKubernetesFlavor ¶
NewKubernetesFlavor creates a new k8s flavored CSI driver
func (*Flavor) ConfigureAnnotations ¶
func (flavor *Flavor) ConfigureAnnotations(name string, parameters map[string]string) (map[string]string, error)
ConfigureAnnotations takes the PVC annotations and overrides any parameters in the CSI create volume request
func (*Flavor) CreateNFSVolume ¶
func (flavor *Flavor) CreateNFSVolume(pvName string, reqVolSize int64, parameters map[string]string, volumeContentSource *csi.VolumeContentSource) (nfsVolume *csi.Volume, rollback bool, err error)
CreateNFSVolume creates nfs volume abstracting underlying nfs pvc, deployment and service
func (*Flavor) DeleteNFSVolume ¶
DeleteNFSVolume deletes nfs volume which represents nfs pvc, deployment and service
func (*Flavor) DeleteVolumeAttachment ¶ added in v1.2.0
func (*Flavor) GetCredentialsFromSecret ¶
func (flavor *Flavor) GetCredentialsFromSecret(name string, namespace string) (map[string]string, error)
GetCredentialsFromSecret retrieves the secrets map for the given secret name and namespace if exists, else returns nil
func (*Flavor) GetCredentialsFromVolume ¶ added in v1.4.0
GetCredentialsFromVolume retrieves the credentials from volume
func (*Flavor) GetEphemeralVolumeSecretFromPod ¶ added in v1.2.0
func (flavor *Flavor) GetEphemeralVolumeSecretFromPod(volumeHandle string, podName string, namespace string) (string, error)
GetEphemeralVolumeSecretFromPod retrieves secret for a given CSI volname from a specified POD name and namespace
func (*Flavor) GetGroupSnapshotNameFromSnapshotName ¶ added in v1.4.0
func (*Flavor) GetNFSVolumeID ¶ added in v1.2.0
GetNFSVolumeID returns underlying volume-id of RWO PV based on RWX PV volume-id, if one exists
func (*Flavor) GetNodeByName ¶ added in v1.2.0
func (*Flavor) GetNodeInfo ¶
GetNodeInfo retrieves the Node identified by nodeID from the list of CRDs
func (*Flavor) GetOrchestratorVersion ¶ added in v1.2.0
func (*Flavor) GetVolumePropertyOfPV ¶ added in v1.1.0
GetVolumePropertyOfPV retrieves volume filesystem for a given CSI volname
func (*Flavor) HandleNFSNodePublish ¶
func (flavor *Flavor) HandleNFSNodePublish(req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*Flavor) IsNFSVolume ¶
IsNFSVolume returns true if given volumeID belongs to nfs access volume
func (*Flavor) IsPodExists ¶ added in v1.2.0
IsPodExists checks if the pod with the given uid exists on the cluster
func (*Flavor) ListVolumeAttachments ¶ added in v1.2.0
func (flavor *Flavor) ListVolumeAttachments() (*storage_v1.VolumeAttachmentList, error)
func (*Flavor) LoadNodeInfo ¶
LoadNodeInfo will load a node as an HPENodeInfo CRD object
func (*Flavor) MonitorPod ¶ added in v1.2.0
MonitorPod monitors pods with given labels for being in unknown state(node unreachable/lost) and assist them to move to different node
func (*Flavor) RollbackNFSResources ¶ added in v1.2.0
func (*Flavor) UnloadNodeInfo ¶
func (flavor *Flavor) UnloadNodeInfo()
UnloadNodeInfo remove the HPENodeInfo from the list of CRDs