kubernetes

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetaUIDFunc

func MetaUIDFunc(obj interface{}) ([]string, error)

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

func NewKubernetesFlavor(nodeService bool, chapiDriver chapi.Driver) (*Flavor, error)

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

func (flavor *Flavor) DeleteNFSVolume(volumeID string) error

DeleteNFSVolume deletes nfs volume which represents nfs pvc, deployment and service

func (*Flavor) DeletePod added in v1.2.0

func (flavor *Flavor) DeletePod(podName string, namespace string, force bool) error

func (*Flavor) DeleteVolumeAttachment added in v1.2.0

func (flavor *Flavor) DeleteVolumeAttachment(va string, force bool) error

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

func (flavor *Flavor) GetCredentialsFromVolume(name string) (map[string]string, error)

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 *Flavor) GetGroupSnapshotNameFromSnapshotName(name string) (string, error)

func (*Flavor) GetNFSVolumeID added in v1.2.0

func (flavor *Flavor) GetNFSVolumeID(volumeID string) (string, error)

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 *Flavor) GetNodeByName(nodeName string) (*v1.Node, error)

func (*Flavor) GetNodeInfo

func (flavor *Flavor) GetNodeInfo(nodeID string) (*model.Node, error)

GetNodeInfo retrieves the Node identified by nodeID from the list of CRDs

func (*Flavor) GetOrchestratorVersion added in v1.2.0

func (flavor *Flavor) GetOrchestratorVersion() (*version.Info, error)

func (*Flavor) GetVolumePropertyOfPV added in v1.1.0

func (flavor *Flavor) GetVolumePropertyOfPV(propertyName string, pvName string) (string, error)

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

func (flavor *Flavor) IsNFSVolume(volumeID string) bool

IsNFSVolume returns true if given volumeID belongs to nfs access volume

func (*Flavor) IsPodExists added in v1.2.0

func (flavor *Flavor) IsPodExists(uid string) (bool, error)

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

func (flavor *Flavor) LoadNodeInfo(node *model.Node) (string, error)

LoadNodeInfo will load a node as an HPENodeInfo CRD object

func (*Flavor) MonitorPod added in v1.2.0

func (flavor *Flavor) MonitorPod(podLabelkey, podLabelvalue string) error

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 *Flavor) RollbackNFSResources(nfsResourceName string, nfsNamespace string) error

func (*Flavor) UnloadNodeInfo

func (flavor *Flavor) UnloadNodeInfo()

UnloadNodeInfo remove the HPENodeInfo from the list of CRDs

type NFSSpec

type NFSSpec struct {
	// contains filtered or unexported fields
}

NFSSpec for creating NFS resources

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL